Documentation
¶
Overview ¶
The semtok package provides an encoder for LSP's semantic tokens.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Modifier ¶ added in v0.17.0
type Modifier string
const ( // LSP 3.18 standard modifiers // As with TokenTypes, clients get only the modifiers they request. // // If you add or uncomment a modifier, document it in // gopls/doc/features/passive.md#semantic-tokens. ModDefaultLibrary Modifier = "defaultLibrary" // for predeclared symbols ModDefinition Modifier = "definition" // for the declaring identifier of a symbol ModReadonly Modifier = "readonly" // for constants (TokVariable) // non-standard modifiers // // Since the type of a symbol is orthogonal to its kind, // (e.g. a variable can have function type), // we use modifiers for the top-level type constructor. ModArray Modifier = "array" ModBool Modifier = "bool" ModChan Modifier = "chan" ModInterface Modifier = "interface" ModMap Modifier = "map" ModNumber Modifier = "number" ModPointer Modifier = "pointer" ModSignature Modifier = "signature" // for function types ModSlice Modifier = "slice" ModString Modifier = "string" ModStruct Modifier = "struct" )
type TokenType ¶
type TokenType string
const ( // These are the tokens defined by LSP 3.18, but a client is // free to send its own set; any tokens that the server emits // that are not in this set are simply not encoded in the bitfield. // // If you add or uncomment a token type, document it in // gopls/doc/features/passive.md#semantic-tokens. TokComment TokenType = "comment" // for a comment TokFunction TokenType = "function" // for a function TokKeyword TokenType = "keyword" // for a keyword TokLabel TokenType = "label" // for a control label (LSP 3.18) TokMacro TokenType = "macro" // for text/template tokens TokMethod TokenType = "method" // for a method TokNamespace TokenType = "namespace" // for an imported package name TokNumber TokenType = "number" // for a numeric literal TokOperator TokenType = "operator" // for an operator TokParameter TokenType = "parameter" // for a parameter variable TokString TokenType = "string" // for a string literal TokType TokenType = "type" // for a type name (plus other uses) TokTypeParam TokenType = "typeParameter" // for a type parameter TokVariable TokenType = "variable" // for a var or const )
Click to show internal directories.
Click to hide internal directories.