nridge requested changes to this revision. nridge added a comment. This revision now requires changes to proceed.
Thanks for the patch! I think this is a nice and general solution, which rather than solving just a specific problem (e.g. highlighting of `new` as an operator vs. a keyword), gives users a broader ability to fine-tune clangd's highlightings to suit their needs. Could I kindly ask you to make a PR that updates https://github.com/llvm/clangd-www/blob/main/config.md to cover the new config keys, as well? ================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:400 + bool ActiveKindLookup[static_cast<size_t>(HighlightingKind::LastKind) + 1]; + uint32_t ActiveModifiersMask; +}; ---------------- For good measure, let's `static_assert(HighlightingModifier::LastModifier < 32)` ================ Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:590 const LangOptions &LangOpts; + const HighlightingFilter &Filter; bool IncludeInactiveRegionTokens; ---------------- This needs to be stored by value, otherwise it will dangle Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148489/new/ https://reviews.llvm.org/D148489 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits