mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
docs(lsp): describe semantic tokens highlight groups with more details
Problem: Description of highlight groups for LSP semantic tokens can be more up to date and useful. Right now it misses several actually defined highlight groups and presents information about Vim highlight groups they are linked to. This is both outdated (they link to tree-sitter `@` groups now) and redundant (users can see this information with `:Inspect` over the group name itself). Solution: Synchronize the list of groups with specification and provide actionable descriptions.
This commit is contained in:
parent
c1c6c1ee12
commit
45032a941d
@ -454,30 +454,44 @@ You probably want these inside a |ColorScheme| autocommand.
|
||||
Use |LspTokenUpdate| and |vim.lsp.semantic_tokens.highlight_token()| for more
|
||||
complex highlighting.
|
||||
|
||||
The following groups are linked by default to standard |group-name|s:
|
||||
The following is a list of standard captures used in queries for Nvim,
|
||||
highlighted according to the current colorscheme (use |:Inspect| on one to see
|
||||
the exact definition):
|
||||
|
||||
@lsp.type.class Structure
|
||||
@lsp.type.decorator Function
|
||||
@lsp.type.enum Structure
|
||||
@lsp.type.enumMember Constant
|
||||
@lsp.type.event Type
|
||||
@lsp.type.function Function
|
||||
@lsp.type.interface Structure
|
||||
@lsp.type.keyword Keyword
|
||||
@lsp.type.macro Macro
|
||||
@lsp.type.method Function
|
||||
@lsp.type.modifier Type
|
||||
@lsp.type.namespace Structure
|
||||
@lsp.type.number Number
|
||||
@lsp.type.operator Operator
|
||||
@lsp.type.parameter Identifier
|
||||
@lsp.type.property Identifier
|
||||
@lsp.type.regexp SpecialChar
|
||||
@lsp.type.string String
|
||||
@lsp.type.struct Structure
|
||||
@lsp.type.type Type
|
||||
@lsp.type.typeParameter TypeDef
|
||||
@lsp.type.variable Identifier
|
||||
@lsp.type.class Identifiers that declare or reference a class type
|
||||
@lsp.type.comment Tokens that represent a comment
|
||||
@lsp.type.decorator Identifiers that declare or reference decorators and annotations
|
||||
@lsp.type.enum Identifiers that declare or reference an enumeration type
|
||||
@lsp.type.enumMember Identifiers that declare or reference an enumeration property, constant, or member
|
||||
@lsp.type.event Identifiers that declare an event property
|
||||
@lsp.type.function Identifiers that declare a function
|
||||
@lsp.type.interface Identifiers that declare or reference an interface type
|
||||
@lsp.type.keyword Tokens that represent a language keyword
|
||||
@lsp.type.macro Identifiers that declare a macro
|
||||
@lsp.type.method Identifiers that declare a member function or method
|
||||
@lsp.type.modifier Tokens that represent a modifier
|
||||
@lsp.type.namespace Identifiers that declare or reference a namespace, module, or package
|
||||
@lsp.type.number Tokens that represent a number literal
|
||||
@lsp.type.operator Tokens that represent an operator
|
||||
@lsp.type.parameter Identifiers that declare or reference a function or method parameters
|
||||
@lsp.type.property Identifiers that declare or reference a member property, member field, or member variable
|
||||
@lsp.type.regexp Tokens that represent a regular expression literal
|
||||
@lsp.type.string Tokens that represent a string literal
|
||||
@lsp.type.struct Identifiers that declare or reference a struct type
|
||||
@lsp.type.type Identifiers that declare or reference a type that is not covered above
|
||||
@lsp.type.typeParameter Identifiers that declare or reference a type parameter
|
||||
@lsp.type.variable Identifiers that declare or reference a local or global variable
|
||||
|
||||
@lsp.mod.abstract Types and member functions that are abstract
|
||||
@lsp.mod.async Functions that are marked async
|
||||
@lsp.mod.declaration Declarations of symbols
|
||||
@lsp.mod.defaultLibrary Symbols that are part of the standard library
|
||||
@lsp.mod.definition Definitions of symbols, for example, in header files
|
||||
@lsp.mod.deprecated Symbols that should no longer be used
|
||||
@lsp.mod.documentation Occurrences of symbols in documentation
|
||||
@lsp.mod.modification Variable references where the variable is assigned to
|
||||
@lsp.mod.readonly Readonly variables and member fields (constants)
|
||||
@lsp.mod.static Class members (static members)
|
||||
|
||||
==============================================================================
|
||||
EVENTS *lsp-events*
|
||||
|
Loading…
Reference in New Issue
Block a user