nordtheme / vim

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

Neovim lsp warning message is not using nord-13 #267

Closed weizheheng closed 3 years ago

weizheheng commented 3 years ago

I have recently update nord-vim and I realize the warning message is no longer using nord-13.

image

arcticicestudio commented 3 years ago

Hi @marcushwz :wave:, thanks for your contribution :+1:

I guess you're running version 0.17.0 which introduced support for nvim-treesitter. Like mentioned in the changelog this was the first implementation iteration and inconsistencies, compared to the current highlighting when using “normal“ Vim plugins per language, are expected so your report is very welcome.

In order to ensure the problem is related to the Nord theme you need to reproduce it with a minimal and clean configuration. This can be done by creating new configuration file with any name (e.g. testrc) and run Vim with the following command: vim -u testrc For me as a theme author it is not possible to know if the theme is the root cause of the problem when there are other attributes set in the configuration because each one might break the theme.

Here's an minimal test configuration you can use to try to reproduce the problem (supposed you're using vim-plug):

call plug#begin(expand('~/.vim/plugged'))
Plug 'arcticicestudio/nord-vim'
if has("nvim")
  Plug 'neovim/nvim-lspconfig'
  Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
endif
call plug#end()

set nocompatible
if (has("termguicolors"))
  set termguicolors
endif

syntax enable
colorscheme nord

I've quickly checked the LSP definition and the LspDiagnosticsDefaultWarning group is defined to use nord13 so I'm not quite sure if tree-sitter maybe takes precedence with another highlighting group, but TSWarning is also lined to the Todo group which uses nord13 too.

Can you also please check which group is shown when you move the cursor to the detected element and execute :TSHighlightCapturesUnderCursor?

weizheheng commented 3 years ago

Hi @arcticicestudio, thank you so much for the quick reply. I am still using vim-polygot for the syntax highlighting, so I can't really check :TSHighlightCapturesUnderCursor.

I give it a try for minimal configuration as below, but the problem still persists.

call plug#begin(expand('~/.vim/plugged'))
Plug 'arcticicestudio/nord-vim'
Plug 'neovim/nvim-lspconfig'
call plug#end()

set nocompatible
if (has("termguicolors"))
  set termguicolors
endif

syntax enable
colorscheme nord

lua require('marcus.lsp')
arcticicestudio commented 3 years ago

Large frameworks/plugin collections like vim-polygot are often known to cause problems when mixed with other plugins due to the heavy amount of plugins and the order how the code is parsed and loaded. When the problem does not occur when running the minimal configuration it is likely that this is caused by this plugin.

weizheheng commented 3 years ago

For my minimal configuration, I do not include vim-polygot, but the highlighting for Warning is still using the wrong color. As per the configuration above, I have only included nord-vim and nvim-lspconfig. I will try and see if reverting back to previous commit helps.

weizheheng commented 3 years ago

@arcticicestudio, I have figured it out. So sorry, I think I am confused with the difference between warning, information and hint diagnostics. Seems like the above diagnostics falls under the hint categories, that's why it's not using nord-13. I will just change it myself :) Thanks for guiding me though!

Update: Closing this issue.

arcticicestudio commented 3 years ago

To be true, I would have also classified it as a warning. At least this is the case for all of my ESLint setups. Anyway, thanks for your tests and feedback 👍🏻