Mofiqul / vscode.nvim

Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
MIT License
722 stars 114 forks source link

Semantic Token support #111

Closed xyven1 closed 1 year ago

xyven1 commented 1 year ago

There appears to be some kind of issue with sematic tokens when using vscode.nvim. This is how code is highlighted when just using Treesitter: image

But when enabling the neovim lsp this is what I end up with image

The semantic tokens in the lsp are only supposed to make minor corrections to highlighting based on information that only the lsp has access to, and so everything becoming the dark blue highlight color is not desirable.

xyven1 commented 1 year ago

A good example of a theme which does this well is onedarkpro

xyven1 commented 1 year ago

Potentially this issue could be addressed by changing hl(0, 'Structure', { fg = c.vscBlue, bg = 'NONE' }) to hl(0, 'Structure', { fg = c.vscBlueGreen, bg = 'NONE' })

These are the default links for semantic tokens in neovim.

"default link @class Structure",
  "default link @struct Structure",
  "default link @enum Type",
  "default link @enumMember Constant",
  "default link @event Identifier",
  "default link @interface Identifier",
  "default link @modifier Identifier",
  "default link @regexp SpecialChar",
  "default link @typeParameter Type",
  "default link @decorator Identifier"

I'm not sure how the basic color definitions were decided in theme.lua, but based on the default links in the semantic tokens maybe Structure should be a greenblue?

xyven1 commented 1 year ago

Unless an issues arises with #112 this issue should be resolved.