Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(#1482): adds the ability to set a prefix to winbar #1485

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

adriancmiranda
Copy link
Contributor

@adriancmiranda adriancmiranda commented Aug 22, 2024

Context

The previous implementation included the prefix in the folder icons, which was not the intended behavior. This change corrects that mistake (that I made) and improves the flexibility of how the winbar is rendered. The new implementation ensures that folder icons are displayed according to user settings without unnecessary prefixing.

Summary of Changes

This PR includes the following changes:

  • Adding a new highlight group: Introduces a new highlight group to improve customization.
  • Updating the winbar logic: Incorporates a customizable prefix by applying the winbar_prefix setting directly in the winbar. This allows for more flexible and user-defined winbar prefixes.
  • Modifying the handling of folder icons: Adjusts how folder icons are displayed in the winbar. Previously, the winbar prefix was always included in the folder icon representation. This change ensures that the appearance of folder icons is determined based on the configuration and is not always prefixed.
  • Enhancing the construction of the winbar string: Includes the user-defined winbar_prefix at the beginning of the bar, improving its flexibility and appearance.

Testing

A basic test has been added to verify that the winbar correctly reflects the user-defined prefix and handles folder icons appropriately. The test checks the following:

  • The correct application of the winbar_prefix.
  • Proper handling of folder icons without automatic prefixing.

Review Instructions

Please review the changes, especially the new logic for handling winbar_prefix and folder icons. Ensure that the winbar behaves as expected and that the new highlight group integrates seamlessly with the existing themes.

@adriancmiranda adriancmiranda marked this pull request as ready for review August 22, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant