[PATCH] D64922: [clangd] Added option to enable semantic highlighting via an experimental capability
Nathan Ridge via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 27 17:26:59 PDT 2019
nridge added a comment.
I believe this is not necessary. You can add text document capabilities in the vscode client extension like this:
class SemanticHighlightingFeature implements vscodelc.StaticFeature {
fillClientCapabilities(capabilities: vscodelc.ClientCapabilities): void {
const textDocumentCapabilities:
vscodelc.TextDocumentClientCapabilities & { semanticHighlightingCapabilities?: { semanticHighlighting: boolean } }
= capabilities.textDocument;
textDocumentCapabilities.semanticHighlightingCapabilities = { semanticHighlighting: true };
}
}
...
clangdClient.registerFeature(new SemanticHighlightingFeature());
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64922/new/
https://reviews.llvm.org/D64922
More information about the cfe-commits
mailing list