nordtheme / vim

An arctic, north-bluish clean and elegant Vim theme.
https://www.nordtheme.com/ports/vim
MIT License
2.52k stars 274 forks source link

Improve highlights for Neovim LSP #229

Closed gbrlsnchs closed 3 years ago

clason commented 4 years ago

Just a heads-up: these will change again (for the last time?) once https://github.com/neovim/neovim/pull/12655 is merged.

clason commented 3 years ago

And now the PR is merged; the new LSP diagnostic highlight names are listed here: https://github.com/neovim/neovim/blob/35325ddac04b1b59b7982797021cdaabdabc87fb/runtime/doc/lsp.txt#L376

gbrlsnchs commented 3 years ago

Done. Seems visually nice to me.

ojroques commented 3 years ago

The doc mentions that "Sign, underline and virtual text highlights (by default) are linked to their corresponding LspDiagnosticsDefault highlight . Since you're not changing anything for LspDiagnosticsVirtualText* LspDiagnosticsFloating* LspDiagnosticsSign* maybe these lines can be removed?

This is what onedark.vim does (disclaimer: PR was from me).

gbrlsnchs commented 3 years ago

Done, @ojroques! Thanks for the tip.

ojroques commented 3 years ago

Glad to help. I would have kept these lines though since they differ from the defaults:

call s:hi("LspDiagnosticsUnderlineWarning" , s:nord13_gui, "", s:nord13_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineError" , s:nord11_gui, "", s:nord11_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineInformation" , s:nord8_gui, "", s:nord8_term, "", "undercurl", "")
call s:hi("LspDiagnosticsUnderlineHint" , s:nord10_gui, "", s:nord10_term, "", "undercurl", "")

The underline text is quite useful to spot warnings/errors.

gbrlsnchs commented 3 years ago

You're totally right, my bad. Just included those again.

crispgm commented 3 years ago

With LspDiagnosticsUnderline* stuffs specified, it would be buggy of showing colors. However, using LspDiagnosticsDefault* looks okay. 👌

gbrlsnchs commented 3 years ago

With LspDiagnosticsUnderline* stuffs specified, it would be buggy of showing colors. However, using LspDiagnosticsDefault* looks okay.

How come? I'm using my fork with this PR applied and everything seems fine.

crispgm commented 3 years ago

With LspDiagnosticsUnderline* stuffs specified, it would be buggy of showing colors. However, using LspDiagnosticsDefault* looks okay.

How come? I'm using my fork with this PR applied and everything seems fine.

okay, works perfectly on another machine. this is weird.

gbrlsnchs commented 3 years ago

With LspDiagnosticsUnderline* stuffs specified, it would be buggy of showing colors. However, using LspDiagnosticsDefault* looks okay.

How come? I'm using my fork with this PR applied and everything seems fine.

okay, works perfectly on another machine. this is weird.

Might be your Neovim version maybe? Anyway, good it's working!