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

doc: clarify bufferline-custom-areas #900

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

Conversation

dmspelma
Copy link

@dmspelma dmspelma commented May 4, 2024

Update text in bufferline-custom-areas section.

There is an unexplained issue or nuance with the given custom-area example. It is possible for errors to appear with warning/info/hint (or any diagnostic level under any highlight group) due to the way highlight groups are created.

Highlight groups are created on first pass in L21 of method create_hl It is important to note that they are not unset.

For example, if the first diagnostic is a hint, then highlight group BufferLineRightCustomAreaText1 will be the hint highlight group. Then, if you fix the hint and introduce an error diagnostic, it will appear with the hint highlighting.

One solution would be to unset highlight groups and then re-set them during method call. Destroying and creating the highlight groups each time tabline is rendered sounds like an expensive solution.

One workaround is to create the table entries with desired highlights so the BufferLine[side]CustomAreaTest[number] groups and insert the text if needed.

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.

None yet

1 participant