emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.81k stars 890 forks source link

semantic tokens: face name derived from both token type and modifier #4590

Open MaskRay opened 1 month ago

MaskRay commented 1 month ago

For the LSP semantic tokens feature, https://neovim.io/doc/user/lsp.html#lsp-semantic-highlight supports highlight groups @lsp.typemod.<type>.<mod>.<ft>, derived from both token type and modifier, which can be used to customize highlighting for, for example, @lsp.typemod.variable.namespaceScope.cpp.

In contrast, lsp-mode just uses a face name derived from the modifier. The Neovim style typemod can be used to implement rainbow semantic highlighting https://maskray.me/blog/2024-10-20-ccls-and-lsp-semantic-tokens#emacs-ccls