sainnhe / sonokai

High Contrast & Vivid Color Scheme based on Monokai Pro
MIT License
1.65k stars 119 forks source link

Neovim v0.10.0 Upgrade Color Changes #100

Closed kaykhan closed 4 months ago

kaykhan commented 4 months ago

HI friends, i recently had time to upgrade to neovim v0.10.0 and i noticed the text color has changed (despite no change in my theme)

v0.9.1 image

v0.10.0 image

Is there a highlight group which corresponds to both of these?

antoineco commented 4 months ago

Could you please move your cursor to the word that looks different in Neovim 0.10 and post the output of the :Inspect command? (and ideally compare against Neovim 0.9)

kaykhan commented 4 months ago

Oh i did not know about this Inspect feature

There is one difference i see links to Identifier vs links Fg Although im not sure what it means

v0.9.1 image

v0.10.0 image

antoineco commented 4 months ago

The 0.10 highlight is the correct one:

https://github.com/sainnhe/sonokai/blob/a1be1ff2a9eeacfad064277603c3913a8a9be212/colors/sonokai.vim#L520

I am not sure why it was linking to Identifier in 0.9. You might be able to find the answer with the following commands:

:verbose highlight @lsp.type.variable
:verbose highlight @lsp.type.variable.typescript

Are you sure that you are using the same revision of Sonokai in both Neovim releases?

antoineco commented 4 months ago

I wasn't able to reproduce on Neovim v0.9.1 with a fresh configuration including only the following plugins:

image

Here are some details about my setup.

$ :version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
-- init.lua
require "lspconfig".tsserver.setup {}  -- LSP server config
$ :!typescript-language-server --version
4.3.3
$ :LspInfo
Client: tsserver (id: 1, bufnr: [1])
$ :Inspect  # on 'user' at line 16
Treesitter
  - @variable.typescript links to Fg typescript

Semantic Tokens
  - @lsp.type.variable.typescript links to Fg priority: 125
  - @lsp.mod.declaration.typescript links to @lsp priority: 126
  - @lsp.mod.readonly.typescript links to @lsp priority: 126
  - @lsp.typemod.variable.declaration.typescript links to @lsp priority: 127
  - @lsp.typemod.variable.readonly.typescript links to @lsp priority: 127
$ :verbose highlight @lsp.type.variable.typescript
(nothing)
$ :verbose highlight @lsp.type.variable
@lsp.type.variable xxx links to TSVariable
        Last set from ~/.local/share/nvim/lazy/sonokai/colors/sonokai.vim line 670

image

I conclude that @lsp.type.variable.typescript is being linked to Identifier by either another plugin, or some user configuration.

Since the issue is not related to sonokai I am now closing the issue, however feel free to keep discussing in case you need help troubleshooting.