NvChad / starter

Starter config for NvChad
The Unlicense
66 stars 255 forks source link

Fix incorrect colours for lsp virtual text #10

Closed MaggieLostKeys closed 3 months ago

MaggieLostKeys commented 3 months ago

The highlight groups for the lsp virtual text seem to not be initialised properly when starting Neovim with a non-default colour scheme.

Highlight groups DiagnosticOk, DiagnosticHint, DiagnosticInfo, DiagnosticWarn, and DiagnosticError (and others linked) remain at default value, even though a colour scheme (in my case Catppuccin) has been set in chadrc.lua. Setting the theme in a running Neovim instance via the theme switcher will set the above highlight groups correctly. This can be reproduced.

I am not sure if this is due to an issue in the main repository, but running the base46 cache for lsp fixed this issue for me.

siduck commented 3 months ago

lsp hlgroups are only needed after lsp is attached to buffer... not on startup

So please open a file and then lspconfig will load, with the defaults & those diagnostic hlgroups

MaggieLostKeys commented 3 months ago

Apologies. I should have been more clear about this issue. The highlight groups in question weren't updated after attaching to a buffer.

So, even though the code inside the buffer was correctly coloured, the virtual text was not.

siduck commented 3 months ago

ok let me test here and show a video

siduck commented 3 months ago

https://github.com/NvChad/starter/assets/59060246/c9d9e5fc-59aa-431c-a7e6-e87e048ac82e

i hope you're loading defaults()

MaggieLostKeys commented 3 months ago

Interesting. This seems to be an issue with a plugin in my otherwise clean config then. Clean install without any additional plugins fixed this issue.

Thanks for the quick reply

siduck commented 3 months ago

show me list of your plugins and i'll tell

MaggieLostKeys commented 3 months ago

Rebuild config and everything works now. Maybe I didn't call defaults() after all. Not sure. Thanks for the help and sorry for the confusion.