[clangd] Support configuration of inlay hints.
authorSam McCall <sam.mccall@gmail.com>
Thu, 6 Jan 2022 01:01:13 +0000 (02:01 +0100)
committerSam McCall <sam.mccall@gmail.com>
Mon, 10 Jan 2022 09:49:35 +0000 (10:49 +0100)
commit16fd5c278488b3d3275afc381a00ba0b51b070ee
tree8c765c77914b2380cf1bb8fea7fd5fac18fd8bb4
parent27ea0c4e7234f3b15cbbb696e6c408af7141f342
[clangd] Support configuration of inlay hints.

The idea is that the feature will always be advertised at the LSP level, but
depending on config we'll return partial or no responses.

We try to avoid doing the analysis for hints we're not going to return.

Examples of syntax:
```
InlayHints:
  Enabled: No
---
InlayHints:
  ParameterNames: No
---
InlayHints:
  ParameterNames: Yes
  DeducedTypes: Yes
```

Differential Revision: https://reviews.llvm.org/D116713
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/InlayHints.cpp
clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp
clang-tools-extra/clangd/unittests/InlayHintTests.cpp