microsoft / language-server-protocol

Defines a common protocol for language servers.
https://microsoft.github.io/language-server-protocol/
Creative Commons Attribution 4.0 International
11.16k stars 787 forks source link

Detailed explain on semantic token types? #1891

Closed linrongbin16 closed 8 months ago

linrongbin16 commented 8 months ago

Hi,

in semantic tokens, is there more detailed explain about what is typeParameter, regexp, operator, etc?

Because I am trying to apply color themes to this tokens, using the TextMate theme system.

The lsp semantic tokens looks quite similar to the TextMate theme scopes (it's widely used by VS Code, Sublime Text).

But I need more precisely description, so I could compare them and define the mappings (so map a TextMate theme to lsp semantic tokens, or in the opposite direction).

Docs about TextMate theme: