16 #include "clang/Basic/LLVM.h" 17 #include "llvm/ADT/Hashing.h" 18 #include "llvm/ADT/SmallString.h" 19 #include "llvm/ADT/StringSwitch.h" 20 #include "llvm/Support/ErrorHandling.h" 21 #include "llvm/Support/Format.h" 22 #include "llvm/Support/FormatVariadic.h" 23 #include "llvm/Support/JSON.h" 24 #include "llvm/Support/Path.h" 25 #include "llvm/Support/raw_ostream.h" 33 llvm::StringRef TUPath) {
34 assert(llvm::sys::path::is_absolute(AbsPath) &&
"the path is relative");
37 elog(
"URIForFile: failed to resolve path {0} with TU path {1}: " 38 "{2}.\nUsing unresolved path.",
39 AbsPath, TUPath, Resolved.takeError());
46 llvm::StringRef HintPath) {
49 return Resolved.takeError();
54 if (
auto S = E.getAsString()) {
57 elog(
"Failed to parse URI {0}: {1}", *S, Parsed.takeError());
60 if (Parsed->scheme() !=
"file" && Parsed->scheme() !=
"test") {
61 elog(
"Clangd only supports 'file' URI scheme for workspace files: {0}",
68 elog(
"{0}", U.takeError());
84 return llvm::json::Object{{
"uri", R.
uri}};
88 llvm::json::ObjectMapper O(Params);
89 return O && O.map(
"uri", R.
uri);
93 llvm::json::ObjectMapper O(Params);
94 return O && O.map(
"line", R.
line) && O.map(
"character", R.
character);
98 return llvm::json::Object{
109 llvm::json::ObjectMapper O(Params);
110 return O && O.map(
"start", R.
start) && O.map(
"end", R.
end);
114 return llvm::json::Object{
121 return OS << R.
start <<
'-' << R.
end;
125 return llvm::json::Object{
132 return OS << L.
range <<
'@' << L.
uri;
136 llvm::json::ObjectMapper O(Params);
137 return O && O.map(
"uri", R.
uri) && O.map(
"languageId", R.
languageId) &&
138 O.map(
"version", R.
version) && O.map(
"text", R.
text);
142 llvm::json::ObjectMapper O(Params);
143 return O && O.map(
"range", R.
range) && O.map(
"newText", R.
newText);
147 return llvm::json::Object{
154 OS << TE.
range <<
" => \"";
155 llvm::printEscapedString(TE.
newText, OS);
160 if (
auto S = E.getAsString()) {
164 }
else if (*S ==
"messages") {
167 }
else if (*S ==
"verbose") {
176 if (
auto T = E.getAsInteger()) {
187 if (
auto *A = E.getAsArray()) {
188 for (
size_t I = 0; I < A->size(); ++I) {
191 Out.set(
size_t(KindOut));
200 auto KindVal =
static_cast<size_t>(
Kind);
201 if (KindVal >=
SymbolKindMin && KindVal <= SupportedSymbolKinds.size() &&
202 SupportedSymbolKinds[KindVal])
220 case index::SymbolKind::Module:
222 case index::SymbolKind::Namespace:
224 case index::SymbolKind::NamespaceAlias:
226 case index::SymbolKind::Macro:
228 case index::SymbolKind::Enum:
230 case index::SymbolKind::Struct:
232 case index::SymbolKind::Class:
234 case index::SymbolKind::Protocol:
236 case index::SymbolKind::Extension:
238 case index::SymbolKind::Union:
240 case index::SymbolKind::TypeAlias:
242 case index::SymbolKind::Function:
244 case index::SymbolKind::Variable:
246 case index::SymbolKind::Field:
248 case index::SymbolKind::EnumConstant:
250 case index::SymbolKind::InstanceMethod:
251 case index::SymbolKind::ClassMethod:
252 case index::SymbolKind::StaticMethod:
254 case index::SymbolKind::InstanceProperty:
255 case index::SymbolKind::ClassProperty:
256 case index::SymbolKind::StaticProperty:
258 case index::SymbolKind::Constructor:
259 case index::SymbolKind::Destructor:
261 case index::SymbolKind::ConversionFunction:
263 case index::SymbolKind::Parameter:
265 case index::SymbolKind::Using:
268 llvm_unreachable(
"invalid symbol kind");
272 const llvm::json::Object *O = Params.getAsObject();
275 if (
auto *TextDocument = O->getObject(
"textDocument")) {
276 if (
auto *SemanticHighlighting =
277 TextDocument->getObject(
"semanticHighlightingCapabilities")) {
278 if (
auto SemanticHighlightingSupport =
279 SemanticHighlighting->getBoolean(
"semanticHighlighting"))
282 if (
auto *Diagnostics = TextDocument->getObject(
"publishDiagnostics")) {
283 if (
auto CategorySupport = Diagnostics->getBoolean(
"categorySupport"))
285 if (
auto CodeActions = Diagnostics->getBoolean(
"codeActionsInline"))
287 if (
auto RelatedInfo = Diagnostics->getBoolean(
"relatedInformation"))
290 if (
auto *Completion = TextDocument->getObject(
"completion")) {
291 if (
auto *Item = Completion->getObject(
"completionItem")) {
292 if (
auto SnippetSupport = Item->getBoolean(
"snippetSupport"))
295 if (
auto *ItemKind = Completion->getObject(
"completionItemKind")) {
296 if (
auto *ValueSet = ItemKind->get(
"valueSet")) {
302 if (
auto EditsNearCursor = Completion->getBoolean(
"editsNearCursor"))
305 if (
auto *
CodeAction = TextDocument->getObject(
"codeAction")) {
306 if (
CodeAction->getObject(
"codeActionLiteralSupport"))
309 if (
auto *
DocumentSymbol = TextDocument->getObject(
"documentSymbol")) {
310 if (
auto HierarchicalSupport =
314 if (
auto *
Hover = TextDocument->getObject(
"hover")) {
315 if (
auto *ContentFormat =
Hover->getArray(
"contentFormat")) {
316 for (
const auto &Format : *ContentFormat) {
325 if (
auto *Help = TextDocument->getObject(
"signatureHelp")) {
327 if (
auto *
Info = Help->getObject(
"signatureInformation")) {
328 if (
auto *Parameter =
Info->getObject(
"parameterInformation")) {
329 if (
auto OffsetSupport = Parameter->getBoolean(
"labelOffsetSupport"))
335 if (
auto *Workspace = O->getObject(
"workspace")) {
336 if (
auto *
Symbol = Workspace->getObject(
"symbol")) {
338 if (
auto *ValueSet =
SymbolKind->get(
"valueSet")) {
355 llvm::json::ObjectMapper O(Params);
364 O.map(
"trace", R.
trace);
370 return static_cast<int64_t
>(R);
374 return llvm::json::Object{{
"type", R.
type}, {
"message", R.
message}};
378 llvm::json::ObjectMapper O(Params);
383 llvm::json::ObjectMapper O(Params);
388 llvm::json::ObjectMapper O(Params);
395 if (
auto T = E.getAsInteger()) {
406 llvm::json::ObjectMapper O(Params);
407 return O && O.map(
"uri", R.
uri) && O.map(
"type", R.
type);
411 llvm::json::ObjectMapper O(Params);
412 return O && O.map(
"changes", R.
changes);
417 llvm::json::ObjectMapper O(Params);
418 return O && O.map(
"range", R.
range) && O.map(
"rangeLength", R.
rangeLength) &&
419 O.map(
"text", R.
text);
424 llvm::json::ObjectMapper O(Params);
430 llvm::json::ObjectMapper O(Params);
432 O.map(
"position", R.
position) && O.map(
"ch", R.
ch);
436 llvm::json::ObjectMapper O(Params);
441 llvm::json::ObjectMapper O(Params);
446 return llvm::json::Object{
453 llvm::json::Object
Diag{
468 return std::move(
Diag);
472 llvm::json::ObjectMapper O(Params);
473 if (!O || !O.map(
"range", R.
range) || !O.map(
"message", R.
message))
477 O.map(
"code", R.
code);
478 O.map(
"source", R.
source);
483 llvm::json::ObjectMapper O(Params);
488 OS << D.
range <<
" [";
510 llvm::json::ObjectMapper O(Params);
516 llvm::json::ObjectMapper O(Params);
517 return O && O.map(
"changes", R.
changes);
526 llvm::json::ObjectMapper O(Params);
527 if (!O || !O.map(
"command", R.
command))
530 auto Args = Params.getAsObject()->getArray(
"arguments");
531 if (R.
command == ExecuteCommandParams::CLANGD_APPLY_FIX_COMMAND) {
532 return Args && Args->size() == 1 &&
535 if (R.
command == ExecuteCommandParams::CLANGD_APPLY_TWEAK)
541 return llvm::json::Object{
543 {
"kind",
static_cast<int>(P.
kind)},
561 llvm::json::Object
Result{{
"name", llvm::json::Value(
nullptr)},
562 {
"containerName", llvm::json::Value(
nullptr)},
563 {
"usr", llvm::json::Value(
nullptr)},
564 {
"id", llvm::json::Value(
nullptr)}};
576 Result[
"id"] = P.
ID.getValue().str();
579 return llvm::json::Value(std::move(
Result));
585 llvm::StringRef ContNameRef;
586 if (!ContNameRef.endswith(
"::")) {
595 llvm::json::ObjectMapper O(Params);
596 return O && O.map(
"query", R.
query);
600 auto Cmd = llvm::json::Object{{
"title", C.title}, {
"command", C.command}};
602 Cmd[
"arguments"] = {*C.workspaceEdit};
604 Cmd[
"arguments"] = {*C.tweakArgs};
605 return std::move(Cmd);
631 {
"kind",
static_cast<int>(S.
kind)},
640 Result[
"deprecated"] =
true;
642 return llvm::json::Value(std::move(
Result));
647 return llvm::json::Object{};
648 llvm::json::Object FileChanges;
649 for (
auto &Change : *WE.
changes)
650 FileChanges[Change.first] = llvm::json::Array(Change.second);
651 return llvm::json::Object{{
"changes", std::move(FileChanges)}};
655 llvm::json::ObjectMapper O(Params);
656 return O && O.map(
"file", A.
file) && O.map(
"selection", A.
selection) &&
661 return llvm::json::Object{
666 return llvm::json::Object{{
"edit", Params.
edit}};
670 llvm::json::ObjectMapper O(Params);
676 llvm::json::ObjectMapper O(Params);
681 if (!O.map(
"triggerKind", TriggerKind))
685 if (
auto *TC = Params.getAsObject()->get(
"triggerCharacter"))
691 if (!
fromJSON(Params, static_cast<TextDocumentPositionParams &>(R)))
693 if (
auto *
Context = Params.getAsObject()->
get(
"context"))
705 llvm_unreachable(
"Invalid MarkupKind");
709 auto Str = V.getAsString();
711 elog(
"Failed to parse markup kind: expected a string");
714 if (*Str ==
"plaintext")
716 else if (*Str ==
"markdown")
719 elog(
"Unknown markup kind: {0}", *Str);
730 if (MC.
value.empty())
733 return llvm::json::Object{
742 if (H.
range.hasValue())
749 if (
auto T = E.getAsInteger()) {
762 auto KindVal =
static_cast<size_t>(
Kind);
764 KindVal <= SupportedCompletionItemKinds.size() &&
765 SupportedCompletionItemKinds[KindVal])
782 if (
auto *A = E.getAsArray()) {
783 for (
size_t I = 0; I < A->size(); ++I) {
786 Out.set(
size_t(KindOut));
794 assert(!CI.
label.empty() &&
"completion item label is required");
830 return llvm::json::Object{
832 {
"items", llvm::json::Array(L.
items)},
838 "parameter information label is required");
839 llvm::json::Object
Result;
847 return std::move(Result);
851 assert(!SI.
label.empty() &&
"signature information label is required");
852 llvm::json::Object
Result{
854 {
"parameters", llvm::json::Array(SI.
parameters)},
869 "Unexpected negative value for number of active signatures.");
871 "Unexpected negative value for active parameter index");
872 return llvm::json::Object{
875 {
"signatures", llvm::json::Array(SH.
signatures)},
880 llvm::json::ObjectMapper O(Params);
886 return llvm::json::Object{
888 {
"kind",
static_cast<int>(DH.
kind)},
893 return llvm::json::Object{
894 {
"uri", FStatus.
uri},
895 {
"state", FStatus.
state},
911 llvm::json::ObjectMapper O(Params);
912 return O && O.map(
"settings", CCP.
settings);
917 llvm::json::ObjectMapper O(Params);
923 llvm::json::ObjectMapper O(Params);
931 llvm::json::ObjectMapper O(Params);
943 auto T = E.getAsInteger();
954 llvm::json::ObjectMapper O(Params);
967 {
"kind",
static_cast<int>(I.
kind)},
986 llvm::json::ObjectMapper O(Params);
989 if (!(O && O.map(
"name", I.
name) && O.map(
"kind", I.
kind) &&
990 O.map(
"uri", I.
uri) && O.map(
"range", I.
range) &&
996 O.map(
"detail", I.
detail);
1000 O.map(
"data", I.
data);
1007 llvm::json::ObjectMapper O(Params);
1008 return O && O.map(
"item", P.
item) && O.map(
"resolve", P.
resolve) &&
1028 llvm_unreachable(
"Unknown clang.clangd.OffsetEncoding");
1032 auto Str = V.getAsString();
1035 OE = llvm::StringSwitch<OffsetEncoding>(*Str)
1052 return llvm::json::Object{{
"line", Highlighting.
Line},
1053 {
"tokens", Highlighting.
Tokens}};
1057 return llvm::json::Object{
1059 {
"lines", std::move(Highlighting.
Lines)},
std::string insertText
A string that should be inserted to a document when selecting this completion.
std::string USR
Unified Symbol Resolution identifier This is an opaque string uniquely identifying a symbol...
const tooling::CompileCommand & Command
llvm::Optional< std::vector< TypeHierarchyItem > > children
If this type hierarchy item is resolved, it contains the direct children of the current item...
URIForFile uri
The file's URI.
std::string code
The diagnostic's code. Can be omitted.
llvm::json::Value toJSON(const FuzzyFindRequest &Request)
TypeHierarchyDirection direction
The direction of the hierarchy levels to resolve.
llvm::Optional< TextEdit > textEdit
An edit which is applied to a document when selecting this completion.
Exact commands are not specified in the protocol so we define the ones supported by Clangd here...
llvm::Optional< SymbolKindBitset > WorkspaceSymbolKinds
The supported set of SymbolKinds for workspace/symbol.
llvm::Optional< URIForFile > rootUri
The rootUri of the workspace.
Position start
The range's start position.
friend bool operator==(const URIForFile &LHS, const URIForFile &RHS)
ConfigurationSettings settings
Represents a collection of completion items to be presented in the editor.
Range range
The range this highlight applies to.
llvm::Optional< bool > wantDiagnostics
Forces diagnostics to be generated, or to not be generated, for this version of the file...
std::vector< std::string > compilationCommand
Range range
The range for which the command was invoked.
CodeActionContext context
Context carrying additional information.
static const llvm::StringLiteral CLANGD_APPLY_FIX_COMMAND
CompletionItemKind kind
The kind of this completion item.
Clangd extension: parameters configurable at initialize time.
bool CompletionSnippets
Client supports snippets as insert text.
std::vector< CompletionItem > items
The completion items.
llvm::Optional< std::vector< CodeAction > > codeActions
Clangd extension: code actions related to this diagnostic.
clang::find_all_symbols::SymbolInfo::SymbolKind SymbolKind
llvm::Optional< std::map< std::string, std::vector< TextEdit > > > changes
Holds changes to existing resources.
llvm::Optional< std::string > kind
The kind of the code action.
std::string title
A short, human-readable, title for this code action.
llvm::Optional< Range > range
An optional range is a range inside a text document that is used to visualize a hover, e.g.
TextDocumentIdentifier textDocument
The document that was closed.
SymbolKind indexSymbolKindToSymbolKind(index::SymbolKind Kind)
static llvm::StringRef toTextKind(MarkupKind Kind)
std::string tweakID
ID of the tweak that should be executed. Corresponds to Tweak::id().
std::string state
The human-readable string presents the current state of the file, can be shown in the UI (e...
llvm::Optional< std::string > data
An optional 'data' filed, which can be used to identify a type hierarchy item in a resolve request...
A code action represents a change that can be performed in code, e.g.
URIForFile uri
The text document's URI.
std::string text
The new text of the range/document.
llvm::Optional< WorkspaceEdit > edit
The workspace edit this code action performs.
Range selectionRange
The range that should be selected and revealed when this symbol is being picked, e.g the name of a function.
constexpr auto SymbolKindMin
The show message notification is sent from a server to a client to ask the client to display a partic...
llvm::Optional< std::string > compilationDatabasePath
std::string sortText
A string that should be used when comparing this item with other items.
constexpr auto CompletionItemKindMin
std::string name
The human readable name of the hierarchy item.
std::bitset< CompletionItemKindMax+1 > CompletionItemKindBitset
bool isIncomplete
The list is not complete.
Range selectionRange
The range that should be selected and revealed when this type hierarchy item is being picked...
std::string documentation
A human-readable string that represents a doc-comment.
Range range
The range enclosing this symbol not including leading/trailing whitespace but everything else like co...
URIForFile uri
The text document's URI.
std::vector< TextEdit > additionalTextEdits
An optional array of additional text edits that are applied when selecting this completion.
void elog(const char *Fmt, Ts &&... Vals)
Represents programming constructs like variables, classes, interfaces etc.
static const llvm::StringLiteral CLANGD_APPLY_TWEAK
MarkupKind HoverContentFormat
The content format that should be used for Hover requests.
llvm::Optional< int > processId
The process Id of the parent process that started the server.
Range range
The range enclosing this type hierarchy item not including leading/trailing whitespace but everything...
CompletionItemKind
The kind of a completion entry.
ConfigurationSettings ConfigSettings
TextDocumentIdentifier TextDocument
The textdocument these highlightings belong to.
A top-level diagnostic that may have Notes and Fixes.
bool OffsetsInSignatureHelp
Client supports processing label offsets instead of a simple label string.
MarkupContent contents
The hover's content.
A document highlight is a range inside a text document which deserves special attention.
URIForFile uri
The text document's URI.
bool CompletionFixes
Client supports completions with additionalTextEdit near the cursor.
std::string detail
A human-readable string with additional information about this item, like type or symbol information...
const Type * get(const Key< Type > &Key) const
Get data stored for a typed Key.
llvm::Optional< SymbolID > ID
std::string source
A human-readable string describing the source of this diagnostic, e.g.
llvm::Optional< TweakArgs > tweakArgs
TextDocumentIdentifier textDocument
The document that was opened.
std::string newText
The string to be inserted.
Parameters for the semantic highlighting (server-side) push notification.
bool DiagnosticCategory
Whether the client accepts diagnostics with category attached to it using the "category" extension...
std::string newName
The new name of the symbol.
Clangd extension: parameters configurable at any time, via the workspace/didChangeConfiguration notif...
std::string command
The command identifier, e.g. CLANGD_APPLY_FIX_COMMAND.
static llvm::Expected< URIForFile > fromURI(const URI &U, llvm::StringRef HintPath)
InitializationOptions initializationOptions
User-provided initialization options.
TextDocumentIdentifier textDocument
std::string filterText
A string that should be used when filtering a set of completion items.
TextDocumentIdentifier textDocument
The document in which the command was invoked.
Range range
The range of the text document to be manipulated.
static llvm::Expected< std::string > resolvePath(llvm::StringRef AbsPath, llvm::StringRef HintPath="")
Resolves AbsPath into a canonical path of its URI, by converting AbsPath to URI and resolving the URI...
bool deprecated
Indicates if this item is deprecated.
int activeSignature
The active signature.
std::vector< std::string > fallbackFlags
MessageType type
The message type.
int activeParameter
The active parameter of the active signature.
static const char * toString(OffsetEncoding OE)
llvm::Optional< Range > range
The range of the document that changed.
llvm::Optional< std::string > category
The diagnostic's category.
CompletionTriggerKind triggerKind
How the completion was triggered.
static URIForFile canonicalize(llvm::StringRef AbsPath, llvm::StringRef TUPath)
Canonicalizes AbsPath via URI.
Position position
The position inside the text document.
URIForFile file
A file provided by the client on a textDocument/codeAction request.
std::string containerName
bool SemanticHighlighting
Client supports semantic highlighting.
std::vector< DocumentSymbol > children
Children of this symbol, e.g. properties of a class.
static const llvm::StringLiteral REFACTOR_KIND
std::vector< SignatureInformation > signatures
The resulting signatures.
llvm::Optional< int > rangeLength
The length of the range that got replaced.
bool FileStatus
Clients supports show file status for textDocument/clangd.fileStatus.
std::string name
The name of this symbol.
bool DiagnosticFixes
Whether the client accepts diagnostics with codeActions attached inline.
ClientCapabilities capabilities
The capabilities provided by the client (editor or tool)
TextDocumentItem textDocument
The document that was opened.
llvm::Optional< std::string > detail
Optional detail for the hierarchy item.
A context is an immutable container for per-request data that must be propagated through layers that ...
TextDocumentIdentifier textDocument
The document that did change.
std::map< std::string, ClangdCompileCommand > compilationDatabaseChanges
std::string detail
More detail for this symbol, e.g the signature of a function.
std::vector< FileEvent > changes
The actual file events.
std::vector< SemanticHighlightingInformation > Lines
The lines of highlightings that should be sent.
llvm::Optional< CompletionItemKindBitset > CompletionItemKinds
The supported set of CompletionItemKinds for textDocument/completion.
std::string languageId
The text document's language identifier.
llvm::Optional< std::string > rootPath
The rootPath of the workspace.
bool CodeActionStructure
Client supports CodeAction return value for textDocument/codeAction.
bool fromJSON(const llvm::json::Value &Parameters, FuzzyFindRequest &Request)
int line
Line position in a document (zero-based).
std::vector< TextDocumentContentChangeEvent > contentChanges
The actual content changes.
int character
Character offset on a line in a document (zero-based).
TypeHierarchyDirection direction
The direction of the hierarchy levels to resolve.
CompletionContext context
Represents the signature of a callable.
std::string query
A non-empty query string.
The class presents a C++ symbol, e.g.
SymbolKind kind
The kind of this symbol.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
std::bitset< SymbolKindMax+1 > SymbolKindBitset
std::string message
The diagnostic's message.
std::string triggerCharacter
The trigger character (a single character) that has trigger code complete.
TextDocumentIdentifier textDocument
The text document.
static const llvm::StringLiteral INFO_KIND
std::string label
The label of this completion item.
The type hierarchy params is an extension of the TextDocumentPositionsParams with optional properties...
DocumentHighlightKind kind
The highlight kind, default is DocumentHighlightKind.Text.
SymbolKind adjustKindToCapability(SymbolKind Kind, SymbolKindBitset &SupportedSymbolKinds)
static const llvm::StringLiteral QUICKFIX_KIND
A URI describes the location of a source file.
Range selection
A selection provided by the client on a textDocument/codeAction request.
std::vector< Diagnostic > diagnostics
An array of diagnostics.
int severity
The diagnostic's severity.
bool deprecated
Indicates if this symbol is deprecated.
llvm::Optional< Command > command
A command this code action executes.
llvm::Optional< llvm::Expected< tooling::AtomicChanges > > Result
The parameters of a Workspace Symbol Request.
FileChangeType type
The change type.
llvm::Optional< std::vector< TypeHierarchyItem > > parents
If this type hierarchy item is resolved, it contains the direct parents.
int resolve
The hierarchy levels to resolve. 0 indicates no level.
Parameters for the typeHierarchy/resolve request.
std::string workingDirectory
std::string text
The content of the opened text document.
Clangd extension: indicates the current state of the file in clangd, sent from server via the textDoc...
static llvm::Expected< std::string > resolve(const URI &U, llvm::StringRef HintPath="")
Resolves the absolute path of U.
llvm::Optional< std::vector< Diagnostic > > diagnostics
The diagnostics that this code action resolves.
SymbolKind kind
The kind of the hierarchy item. For instance, class or interface.
Position position
The position at which this request was sent.
URIForFile uri
The text document's URI.
std::string message
The actual message.
TypeHierarchyItem item
The item to resolve.
static llvm::Expected< URI > parse(llvm::StringRef Uri)
Parse a URI string "<scheme>:[//<authority>/]<path>".
Range range
The range at which the message applies.
friend bool operator<(const URIForFile &LHS, const URIForFile &RHS)
int version
The version number of this document (it will strictly increase after each.
bool HasSignatureHelp
Client supports signature help.
bool DiagnosticRelatedInformation
Whether the client accepts diagnostics with related locations.
std::unique_ptr< GlobalCompilationDatabase > Base
Position end
The range's end position.
llvm::Optional< WorkspaceEdit > workspaceEdit
int resolve
The hierarchy levels to resolve. 0 indicates no level.
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
URIForFile uri
The URI of the text document where this type hierarchy item belongs to.
InsertTextFormat insertTextFormat
The format of the insert text.
Clangd extension that's used in the 'compilationDatabaseChanges' in workspace/didChangeConfiguration ...
Arguments for the 'applyTweak' command.
llvm::Optional< std::vector< DiagnosticRelatedInformation > > relatedInformation
An array of related diagnostic information, e.g.
bool deprecated
true if the hierarchy item is deprecated. Otherwise, false.
Represents information about identifier.
llvm::Optional< std::vector< OffsetEncoding > > offsetEncoding
Supported encodings for LSP character offsets. (clangd extension).
llvm::Optional< TraceLevel > trace
The initial trace setting. If omitted trace is disabled ('off').
bool HierarchicalDocumentSymbol
Client supports hierarchical document symbols.