mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-29 00:46:00 +01:00
Adopt official semantic tokens api for JS/TS in html (#144223)
* Adopt official semantic tokens api for JS/TS in html Fixes #114477 This switches the semantic tokens implementation for js/ts inside html to use the finalized `getEncodedSemanticClassifications` api instead of our custom impl * Update tests
This commit is contained in:
@@ -360,7 +360,7 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
||||
async getSemanticTokens(document: TextDocument): Promise<SemanticTokenData[]> {
|
||||
const jsDocument = jsDocuments.get(document);
|
||||
const jsLanguageService = await host.getLanguageService(jsDocument);
|
||||
return getSemanticTokens(jsLanguageService, jsDocument, jsDocument.uri);
|
||||
return [...getSemanticTokens(jsLanguageService, jsDocument, jsDocument.uri)];
|
||||
},
|
||||
getSemanticTokenLegend(): { types: string[]; modifiers: string[] } {
|
||||
return getSemanticTokenLegend();
|
||||
|
||||
Reference in New Issue
Block a user