summaryrefslogtreecommitdiff
path: root/clang-tools-extra/clangd/ConfigFragment.h
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2022-01-06 02:01:13 +0100
committerSam McCall <sam.mccall@gmail.com>2022-01-10 10:26:48 +0100
commit22a34e01066004c9bd8d7ad418df90b8fbcb3749 (patch)
tree940b73f0bc8ba2eb69230842575fa65f4061e998 /clang-tools-extra/clangd/ConfigFragment.h
parentad1b8772cf6b16c1162bb8ff425679f5ff046ae9 (diff)
downloadllvm-maain.tar.gz
[clangd] Support configuration of inlay hints.maain
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
Diffstat (limited to 'clang-tools-extra/clangd/ConfigFragment.h')
-rw-r--r--clang-tools-extra/clangd/ConfigFragment.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/ConfigFragment.h b/clang-tools-extra/clangd/ConfigFragment.h
index 31c4636efa0b..d165b6305aa5 100644
--- a/clang-tools-extra/clangd/ConfigFragment.h
+++ b/clang-tools-extra/clangd/ConfigFragment.h
@@ -283,6 +283,18 @@ struct Fragment {
llvm::Optional<Located<bool>> ShowAKA;
};
HoverBlock Hover;
+
+ /// Configures labels shown inline with the code.
+ struct InlayHintsBlock {
+ /// Enables/disables the inlay-hints feature.
+ llvm::Optional<Located<bool>> Enabled;
+
+ /// Show parameter names before function arguments.
+ llvm::Optional<Located<bool>> ParameterNames;
+ /// Show deduced types for `auto`.
+ llvm::Optional<Located<bool>> DeducedTypes;
+ };
+ InlayHintsBlock InlayHints;
};
} // namespace config