From 6d404ec54bab00d9f86c8d69a70dd94e5ab83434 Mon Sep 17 00:00:00 2001 From: Jean Pierre Date: Mon, 19 Apr 2021 20:26:36 -0500 Subject: feat(lsp): Implement textDocument/semanticTokens/full (#10233) Co-authored-by: Kitson Kelly --- cli/tsc/99_main_compiler.js | 10 ++++++++++ cli/tsc/compiler.d.ts | 8 ++++++++ 2 files changed, 18 insertions(+) (limited to 'cli/tsc') diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index ad661e087..73bab249e 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -660,6 +660,16 @@ delete Object.prototype.__proto__; ), ); } + case "getEncodedSemanticClassifications": { + return respond( + id, + languageService.getEncodedSemanticClassifications( + request.specifier, + request.span, + ts.SemanticClassificationFormat.TwentyTwenty, + ), + ); + } case "getImplementation": { return respond( id, diff --git a/cli/tsc/compiler.d.ts b/cli/tsc/compiler.d.ts index 1488f1b02..13e6564b4 100644 --- a/cli/tsc/compiler.d.ts +++ b/cli/tsc/compiler.d.ts @@ -56,6 +56,7 @@ declare global { | GetDefinitionRequest | GetDiagnosticsRequest | GetDocumentHighlightsRequest + | GetEncodedSemanticClassifications | GetImplementationRequest | GetNavigationTree | GetOutliningSpans @@ -144,6 +145,13 @@ declare global { filesToSearch: string[]; } + interface GetEncodedSemanticClassifications + extends BaseLanguageServerRequest { + method: "getEncodedSemanticClassifications"; + specifier: string; + span: ts.TextSpan; + } + interface GetImplementationRequest extends BaseLanguageServerRequest { method: "getImplementation"; specifier: string; -- cgit v1.2.3