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

Underline doesn't work in windows terminal #318

Closed seudonam closed 1 year ago

seudonam commented 2 years ago

No underline for diagnostics. Screenshot (2) If I deleteif a:attr != "" let cmd = cmd . " gui=" . a:attr . " cterm=" . substitute(a:attr, "undercurl", s:underline, "") endif in nord.vim. Then I got underline but statusline changed somehow. Screenshot (3)

seudonam commented 2 years ago

I use neovim on windows 10.

svengreb commented 2 years ago

Hi @seudonam :wave:

Please see the Nord Vim documentation page about underline styles for details about why underlines are not enabled by default as well as the g:nord_underline theme configuration that allows to enable them.

seudonam commented 2 years ago

I added let g:nord_underline = 1 before, but it doesn't work either.😭I think it's something wrong interacting with windows terminal cz underline works on Windows 10 with alacritty in default mode

svengreb commented 2 years ago

This is possible and the reason why underline styles are disabled by default like described in the Nord Vim docs:

This design decision is based on the known problems of most terminals related to special font styles like underline.

But another reason could be that the Windows terminal is not marking itself as GUI and therefore Vim does not enable GUI specific features. Please try to add the following to your Vim configuration:

if (has("termguicolors"))
  set termguicolors
endif
seudonam commented 2 years ago

@svengreb ☺ set termguicolors is already added in init.vim before. Actually the underline works when I didn't set this.

svengreb commented 2 years ago

Do you use any third-party C++ plugin/package for syntax highlighting other than the bundled one? If so it is possible that is overrides styles for this highlighting group.

Also I just saw that you mentioned that this is related to Neovim LSP diagnostics and the style defined by Nord does explicitly not make use of the underline attribute for the DiagnosticUnderlineWarn syntax group:

https://github.com/arcticicestudio/nord-vim/blob/bc0f057162491e9228207d74bd88b5efe875316e/colors/nord.vim#L191

So my guess is that this is by design, but to make sure it would be nice of you could identify the syntax highlighting group used at the cursor where you are missing the underline.

seudonam commented 1 year ago

updated to neovim 8.0 and underline is ok !