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

Add support for Neovim's native LSP semantic tokens #162

Merged
merged 1 commit into from
Dec 27, 2022

Conversation

nabaco
Copy link
Contributor

@nabaco nabaco commented Dec 26, 2022

This adds proper highlighting to Neovim's native LSP client semantic tokens. Tested with theHamsta/nvim-semantic-tokens.
Need to test with neovim/neovim#21100 in Neovim Nightly.

@nabaco nabaco force-pushed the lsp-semantic-tokens-highlight branch from 06e4c3a to d1a08a0 Compare December 26, 2022 09:32
Copy link
Collaborator

@antoineco antoineco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! One minor comment.

colors/gruvbox-material.vim Outdated Show resolved Hide resolved
@nabaco nabaco force-pushed the lsp-semantic-tokens-highlight branch from d1a08a0 to 5c4fb99 Compare December 26, 2022 11:09
@antoineco antoineco merged commit 3ac46b4 into sainnhe:master Dec 27, 2022
@nabaco nabaco deleted the lsp-semantic-tokens-highlight branch December 27, 2022 07:54
@jdrouhard
Copy link

This doesn't actually work with native LSP--the groups added in this PR were for the old plugin which is deprecated. New built-in support uses @token syntax.

@antoineco
Copy link
Collaborator

antoineco commented Dec 29, 2022

@jdrouhard is there any difference between Treesitter groups and LSP groups?

Regardless, I think we can keep those around until Neovim 0.9 gets released.

@jdrouhard
Copy link

They follow the same format and largely intersect, but there are some that are specific to LSP.

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_semanticTokens

The token types and modifiers are applied directly as highlight groups prepended with @ in the current implementation.

antoineco added a commit that referenced this pull request Apr 5, 2023
This reverts commit 3ac46b4.

New built-in support uses @token syntax.
chaesngmin pushed a commit to chaesngmin/gruvbox-material that referenced this pull request Apr 28, 2023
chaesngmin pushed a commit to chaesngmin/gruvbox-material that referenced this pull request Apr 28, 2023
)"

This reverts commit 3ac46b4.

New built-in support uses @token syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants