[PATCH] D65998: [clangd] Added the vscode SemanticHighlighting feature code but did not enable it in the client.

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 9 04:54:03 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:37
+// experimental semantic highlighting.
+export class Feature implements vscodelc.StaticFeature {
+  scopes: string[];
----------------
nit: name it `SemanticHighlightingFeature`.


================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:38
+export class Feature implements vscodelc.StaticFeature {
+  scopes: string[];
+  fillClientCapabilities(capabilities: vscodelc.ClientCapabilities) {
----------------
I believe the type of lookup table returned from clangd is a string[][]. I'd name it `scopeLookupTable`


================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:62
+
+  handleNotification(params: HighlightingInformation) {
+    const tokenLines = params.lines.map((line): HighlightingLine => {
----------------
I think the params here is defined as `SemanticHighlightingParams` from the LSP proposal, could we use the names as defined in the LSP for these structures (e.g. `SemanticHighlightingParams`, `SemanticHighlightingInformation`)?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65998/new/

https://reviews.llvm.org/D65998





More information about the cfe-commits mailing list