[PATCH] D63559: [clangd] Added functionality for getting semantic highlights for variable and function declarations

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 26 04:48:50 PDT 2019


hokein added inline comments.


================
Comment at: clang-tools-extra/clangd/SemanticHighlight.h:17
+
+enum class SemanticHighlightKind {
+  Variable,
----------------
jvikstrom wrote:
> hokein wrote:
> > LSP proposal is using `Highlighting` rather than `Highlight`, let's align with the LSP proposal, using  `Highlighting` in our names (comments, function, class, and files).
> > 
> > 
> > The name seems too verbose, let's drop the `Semantic`, just use `HighlightingKind`.
> There is also a `DocumentHighlightingKind` enum though. Is there not a possibility of  confusing people with `HighlightingKind` and `DocumentHighlightingKind`?
We have a `DocumentHighlightKind` (without `ing`), but that is in the LSP layer. 

Yeah, it would not be super clear, but if we are in the related context, `HighlightingKind` is clear -- ClangdServer will use `getSemanticHighlights` to get all highlight tokens, so I'd prefer shorter names.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63559





More information about the cfe-commits mailing list