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

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

Closed
weizheheng opened this issue Jul 12, 2021 · 6 comments
Closed

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

weizheheng opened this issue Jul 12, 2021 · 6 comments

Comments

@weizheheng
Copy link

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

image

@arcticicestudio
Copy link
Contributor

arcticicestudio commented Jul 12, 2021

Hi @marcushwz 👋, thanks for your contribution 👍

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Author

weizheheng commented Jul 12, 2021

@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
Copy link
Contributor

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 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants