Class SessionSemanticTokensParams
Request for rdcore/session/semanticTokens: a client asks the language server what the tokens of code fragments it supplies are - the colours of a
condition, or of a line typed at a prompt.
[Method("rdcore/session/semanticTokens", Direction.ClientToServer)]
public record SessionSemanticTokensParams : IRequest, IRequest<Unit>, IRequest<SessionSemanticTokensResult>, IBaseRequest, IEquatable<SessionSemanticTokensParams>
- Inheritance
-
SessionSemanticTokensParams
- Implements
-
IRequestIRequest<Unit>IRequest<SessionSemanticTokensResult>IBaseRequest
- Inherited Members
Remarks
The counterpart to SessionCompletionParams for semantic tokens: an editor asks LSP's own textDocument/semanticTokens/full of a document it
has open, and a shell has no document for the condition of a breakpoint. Each fragment is answered with the tokens of its text, with the legend and the encoding
of textDocument/semanticTokens/full - the positions are in the fragment, its first line being line 0 - so that a client colours it as it colours a
document.
The names in a fragment are told apart by what Source declares and the workspace's class modules are: a constant is read-only, and the name of a type is a type's, as they are in the module's own listing. Many fragments are asked in one request, so that a listing of them costs one round trip.
Properties
Fragments
The fragments of code to tell the tokens of, each as it is written: the condition of a breakpoint is one, on one line.
public IReadOnlyList<string> Fragments { get; init; }
Property Value
ModuleName
The module's programmatic name: the module of the workspace by that name is the one the source stands for.
public string ModuleName { get; init; }
Property Value
Source
The complete source of the module the fragments are code of: what its names are resolved against.
public string Source { get; init; }