[clangd] Implement configs to stop clangd produce a certain semantic tokens
authorQingyuan Zheng <qyzheng2@outlook.com>
Fri, 26 May 2023 07:15:10 +0000 (03:15 -0400)
committerNathan Ridge <zeratul976@hotmail.com>
Fri, 26 May 2023 07:25:35 +0000 (03:25 -0400)
commit6feaa5416bf63f9609478d4458485c7306506e26
treef80e294bbb1731ba646b5354246d18d5f881ee1c
parent52d3255704187c3e60de8657d6ece7ab73e07b68
[clangd] Implement configs to stop clangd produce a certain semantic tokens

This patch introduces the following configurations to .clangd:

```
SemanticTokens:
    DisabledKinds: [ ... ]
    DisabledModifiers: [ ... ]
```

Based on the config, clangd would stop producing a certain type of semantic tokens from the source file.

Fixes https://github.com/clangd/clangd/discussions/1598

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D148489
clang-tools-extra/clangd/Config.h
clang-tools-extra/clangd/ConfigCompile.cpp
clang-tools-extra/clangd/ConfigFragment.h
clang-tools-extra/clangd/ConfigYAML.cpp
clang-tools-extra/clangd/SemanticHighlighting.cpp
clang-tools-extra/clangd/SemanticHighlighting.h
clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp