LanguageServerSemanticTokensOptions
LanguageServerSemanticTokensOptions =
Omit<SemanticTokenLayerOptions,"name"> &object
Type Declaration
Section titled “Type Declaration”
readonlyoptionalname?:string
Namespaced within the view. Defaults to semantic.
onLayer()?
Section titled “onLayer()?”
optionalonLayer(layer,document):void|EditorDisposable
Receives the layer the view contribution created.
A host cannot construct one itself: a layer needs a viewport, a snapshot and a lifecycle, and
all three belong to the contribution. Returning a disposable ties the host’s own request-side
controller to the layer, in the shape onConnectionCreated already uses.
A layer never spans two documents or two language ids. A change to either disposes the one
the host is holding and delivers a new one through a second call carrying the new identity —
so clear() across a document change is a call on a dead handle, not a reset.
Parameters
Section titled “Parameters”SemanticTokenLayer
document
Section titled “document”LanguageServerSemanticTokensDocument
Returns
Section titled “Returns”void | EditorDisposable