-
Notifications
You must be signed in to change notification settings - Fork 279
Open
Labels
A-extensionArea: Extension/plugin integration, vscode or VimLArea: Extension/plugin integration, vscode or VimLA-language-supportArea: Language support, syntax highlighting, language server etc.Area: Language support, syntax highlighting, language server etc.A-syntax-highlightingArea: Syntax HighlightingArea: Syntax HighlightingenhancementNew feature or requestNew feature or request
Description
The extension host provides some APIs for semantic highlighting:
$registerDocumentSemanticTokensProvider(handle: number, selector: IDocumentFilterDto[], legend: modes.SemanticTokensLegend, eventHandle: number | undefined): void;
$emitDocumentSemanticTokensEvent(eventHandle: number): void;
$registerDocumentRangeSemanticTokensProvider(handle: number, selector: IDocumentFilterDto[], legend: modes.SemanticTokensLegend): void;
and
$provideDocumentSemanticTokens(handle: number, resource: UriComponents, previousResultId: number, token: CancellationToken): Promise<VSBuffer | null>;
$releaseDocumentSemanticTokens(handle: number, semanticColoringResultId: number): void;
$provideDocumentRangeSemanticTokens(handle: number, resource: UriComponents, range: IRange, token: CancellationToken): Promise<VSBuffer | null>;
We need to wire these APIs up, and integrate them into our language feature / syntax highlighting pipeline, to support languages that use these rich semantic highlights.
Some extensions to test with semantic token support:
- Rust: https://github.com/rust-analyzer/rust-analyzer
- Clang: https://open-vsx.org/extension/llvm-vs-code-extensions/vscode-clangd
- C#: https://github.com/OmniSharp/omnisharp-vscode
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-extensionArea: Extension/plugin integration, vscode or VimLArea: Extension/plugin integration, vscode or VimLA-language-supportArea: Language support, syntax highlighting, language server etc.Area: Language support, syntax highlighting, language server etc.A-syntax-highlightingArea: Syntax HighlightingArea: Syntax HighlightingenhancementNew feature or requestNew feature or request