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

[Bug report] Latest commits broke highlighting #93

Closed
acidghost opened this issue Dec 10, 2024 · 6 comments · Fixed by #95
Closed

[Bug report] Latest commits broke highlighting #93

acidghost opened this issue Dec 10, 2024 · 6 comments · Fixed by #95
Assignees
Labels
bug Something isn't working

Comments

@acidghost
Copy link

Describe the bug

After updating from commit 577fe81 to 58bb5f1 I noticed highlighting with most (maybe all) tree-sitter grammars changed.

As an example, look at the following case for markdown: Screenshot 2024-12-10 at 18 58 11

Expected behavior

Highlight colors should not change and be the ones defined in the theme.

Screenshots

See above.

System

Vim or Neovim: Neovim

Vim or Neovim version: v0.10.2

Any other plugins you may consider relevant: nvim-treesitter (commit 337b503688eccb3046547661e4c738e674548fcf)

Minimal configuration file

Unfortunately I don't have time to create a small reproducer at the moment.. But relevant vimrc config is here.

@acidghost acidghost added the bug Something isn't working label Dec 10, 2024
@acidghost
Copy link
Author

Colors here seem to be associated differently: 577fe81...58bb5f1#diff-8e4da39bbefb342dbac24c7b8fe153c9e2b12798d48a2ea5a75721d462ed88faL68-R70

@GordianDziwis
Copy link
Contributor

The changed highlights from your Markdown example were intentional.
There is no need to highlight bold or italic text becaues they are already rendered bold and italic. Setting a highlight for the whole Markdown code block looks bad in LSP floats with highlights.

Also, the theme only defines the colors and not where they are applied.

Do you have an example where the highlights are not just different but inconsistent or where you think they can be improved?

@acidghost
Copy link
Author

I don't know much about how this repo works, nor how vim syntax highlighting works, so excuse me if the following questions have obvious answers.

There is no need to highlight bold or italic text becaues they are already rendered bold and italic.

This seems like a deliberate choice that users should be able to do by themselves... After years with the same colorscheme, it's really jarring to have a new one kind of forced upon you.

Did the colors I had before the update came from this plugin? If so, is there any change I can make to bring them back with the latest version of this plugin?

Setting a highlight for the whole Markdown code block looks bad in LSP floats with highlights.

This seems a subjective stance. I did not notice anything ugly before and was really quite happy with my colorscheme.

Also the same color change holds for inline code (e.g. this formatting): from orange to white, without any kind of formatting / highlighting, really.

Also, the theme only defines the colors and not where they are applied.

I guess this may help me fix the issues in my own configs. Can you please elaborate more? Can you give an example of how to apply colors to specific parts? Trying to look at previous commits I cannot seem to find changes where colors were applied to syntactic elements and then not anymore.

Do you have an example where the highlights are not just different but inconsistent or where you think they can be improved?

It was just perfect the way it was before 😆

GordianDziwis added a commit that referenced this issue Dec 13, 2024
@GordianDziwis
Copy link
Contributor

Also the same color change holds for inline code (e.g. this formatting): from orange to white, without any kind of formatting / highlighting, really.

Sorry, this was an oversight. I fixed it here: #95

Yes, color schemes are highly subjective, so you have three options:

  1. It was perfect: Pin your version of the plugin to 2ed5ac1.
  2. Override specific highlights: How-to
  3. Report highlights: Open an issue here

There are some mappings you can use to identify highlights.

@acidghost
Copy link
Author

I was missing all the new docs, that helps a lot! Thank you!

With the last couple of fixes you made, I managed to bring most of the colors back to what I had by adding the following:

    call Tinted_Hi("Identifier", g:tinted_gui05, "", g:tinted_cterm05, "", "none", "")
    call Tinted_Hi("Folded", g:tinted_gui02, "", g:tinted_cterm02, "", "none", "")
    call Tinted_Hi("MatchParen", "", g:tinted_gui03, "", g:tinted_cterm03, "none", "")
    call Tinted_Hi("@markup.raw", g:tinted_gui09, "", g:tinted_cterm09, "", "none", "")
    call Tinted_Hi("@markup.raw.block", g:tinted_gui09, "", g:tinted_cterm09, "", "none", "")
    call Tinted_Hi("@markup.link", g:tinted_gui0A, "", g:tinted_cterm0A, "", "none", "")
    call Tinted_Hi("@markup.link.label", g:tinted_gui0C, "", g:tinted_cterm0C, "", "bold", "")
    call Tinted_Hi("@markup.link.url", g:tinted_gui0E, "", g:tinted_cterm0E, "", "underline", "")

I checked also a couple of other programming languages (Rust, Python) and LaTeX. The programming languages seem to look much better (kudos 🙌), but LaTeX seems strange (although I haven't worked with it in a couple of months).

I'll continue to keep an eye if I see something strange, I'll open a new issue if that happens.

BTW this issue would not have happened if there was a Neovim plugin manager that uses semantic versioning or something. Then I would not have been surprised by the update..

@GordianDziwis
Copy link
Contributor

Improvements and Feedback would be very much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants