summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Protocol.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/Protocol.h')
-rw-r--r--clang-tools-extra/clangd/Protocol.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/Protocol.h b/clang-tools-extra/clangd/Protocol.h
index 21bac8abfb5..1ebe8071cda 100644
--- a/clang-tools-extra/clangd/Protocol.h
+++ b/clang-tools-extra/clangd/Protocol.h
@@ -390,6 +390,9 @@ struct ClientCapabilities {
/// Client supports hierarchical document symbols.
bool HierarchicalDocumentSymbol = false;
+ /// Client supports processing label offsets instead of a simple label string.
+ bool OffsetsInSignatureHelp = false;
+
/// The supported set of CompletionItemKinds for textDocument/completion.
/// textDocument.completion.completionItemKind.valueSet
llvm::Optional<CompletionItemKindBitset> CompletionItemKinds;
@@ -979,8 +982,14 @@ llvm::json::Value toJSON(const CompletionList &);
/// A single parameter of a particular signature.
struct ParameterInformation {
- /// The label of this parameter. Mandatory.
- std::string label;
+ /// The label of this parameter. Ignored when labelOffsets is set.
+ std::string labelString;
+
+ /// Inclusive start and exclusive end offsets withing the containing signature
+ /// label.
+ /// Offsets are computed by lspLength(), which counts UTF-16 code units by
+ /// default but that can be overriden, see its documentation for details.
+ llvm::Optional<std::pair<unsigned, unsigned>> labelOffsets;
/// The documentation of this parameter. Optional.
std::string documentation;
OpenPOWER on IntegriCloud