23#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_PROTOCOL_H
24#define LLVM_CLANG_TOOLS_EXTRA_CLANGD_PROTOCOL_H
29#include "clang/Index/IndexSymbol.h"
30#include "llvm/ADT/SmallVector.h"
31#include "llvm/Support/JSON.h"
32#include "llvm/Support/raw_ostream.h"
63class LSPError :
public llvm::ErrorInfo<LSPError> {
72 void log(llvm::raw_ostream &
OS)
const override {
76 return llvm::inconvertibleErrorCode();
80bool fromJSON(
const llvm::json::Value &, SymbolID &, llvm::json::Path);
81llvm::json::Value
toJSON(
const SymbolID &);
98 llvm::StringRef TUPath);
100 static llvm::Expected<URIForFile>
fromURI(
const URI &U,
101 llvm::StringRef HintPath);
104 llvm::StringRef
file()
const {
return File; }
106 explicit operator bool()
const {
return !File.empty(); }
110 return LHS.File == RHS.File;
114 return !(LHS == RHS);
118 return LHS.File < RHS.File;
122 explicit URIForFile(std::string &&File) : File(std::move(File)) {}
128llvm::json::Value
toJSON(
const URIForFile &U);
129bool fromJSON(
const llvm::json::Value &, URIForFile &, llvm::json::Path);
170 return !(LHS == RHS);
181bool fromJSON(
const llvm::json::Value &, Position &, llvm::json::Path);
182llvm::json::Value
toJSON(
const Position &);
183llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
const Position &);
196 return !(LHS == RHS);
207bool fromJSON(
const llvm::json::Value &, Range &, llvm::json::Path);
208llvm::json::Value
toJSON(
const Range &);
209llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
const Range &);
221 return !(LHS == RHS);
257 return std::tie(L.newText, L.range, L.annotationId) ==
260bool fromJSON(
const llvm::json::Value &, TextEdit &, llvm::json::Path);
261llvm::json::Value
toJSON(
const TextEdit &);
262llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
const TextEdit &);
410constexpr auto SymbolKindMax =
static_cast<size_t>(SymbolKind::TypeParameter);
659 return llvm::json::Object{{
"token", P.
token}, {
"value", P.
value}};
939 llvm::SmallVector<DiagnosticTag, 1>
tags;
1012 std::optional<std::map<std::string, std::vector<TextEdit>>>
changes;
1056llvm::json::Value
toJSON(
const Command &
C);
1403llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
1463 int LHSKind =
static_cast<int>(LHS.
kind);
1464 int RHSKind =
static_cast<int>(RHS.
kind);
1465 return std::tie(LHS.
range, LHSKind) < std::tie(RHS.
range, RHSKind);
1473llvm::json::Value
toJSON(
const DocumentHighlight &DH);
1474llvm::raw_ostream &
operator<<(llvm::raw_ostream &,
const DocumentHighlight &);
1520 std::optional<std::vector<ResolveParams>>
parents;
1533 std::optional<std::vector<TypeHierarchyItem>>
parents;
1539 std::optional<std::vector<TypeHierarchyItem>>
children;
1699 std::optional<Location>
location = std::nullopt)
1866 std::optional<std::vector<SemanticTokensEdit>>
edits;
1868 std::optional<std::vector<SemanticToken>>
tokens;
1934 return !(LHS == RHS);
1937llvm::json::Value
toJSON(
const DocumentLink &DocumentLink);
2027template <>
struct DenseMapInfo<
clang::clangd::Range> {
2031 static Range R{Tomb, Tomb};
2036 static Range R{Tomb, Tomb};
2048template <>
struct format_provider<
clang::clangd::Position> {
2051 assert(Style.empty() &&
"style modifiers for this type are not supported");
CompiledFragmentImpl & Out
llvm::raw_string_ostream OS
An Event<T> allows events of type T to be broadcast to listeners.
Values in a Context are indexed by typed keys.
LSPError(std::string Message, ErrorCode Code)
std::error_code convertToErrorCode() const override
void log(llvm::raw_ostream &OS) const override
A URI describes the location of a source file.
static URI createFile(llvm::StringRef AbsolutePath)
This creates a file:// URI for AbsolutePath. The path must be absolute.
std::string toString() const
Returns a string URI with all components percent-encoded.
SymbolKind
The SymbolInfo Type.
@ Created
The file got created.
@ Deleted
The file got deleted.
@ Changed
The file got changed.
constexpr auto CompletionItemKindMax
@ Warning
A warning message.
@ Info
An information message.
std::bitset< SymbolKindMax+1 > SymbolKindBitset
constexpr auto CompletionItemKindMin
constexpr auto SymbolKindMin
CompletionItemKind
The kind of a completion entry.
@ Invoked
Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e....
@ TriggerTriggerForIncompleteCompletions
Completion was re-triggered as the current completion list is incomplete.
@ TriggerCharacter
Completion was triggered by a trigger character specified by the triggerCharacters properties of the ...
bool operator==(const Inclusion &LHS, const Inclusion &RHS)
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, const CodeCompletion &C)
llvm::json::Value toJSON(const FuzzyFindRequest &Request)
SymbolKind adjustKindToCapability(SymbolKind Kind, SymbolKindBitset &SupportedSymbolKinds)
std::string ChangeAnnotationIdentifier
void removeCompletionLabelDetails(CompletionItem &C)
Remove the labelDetails field (for clients that don't support it).
bool operator<(const Ref &L, const Ref &R)
SymbolKind indexSymbolKindToSymbolKind(index::SymbolKind Kind)
InlayHintKind
Inlay hint kinds.
@ BlockEnd
A hint after function, type or namespace definition, indicating the defined symbol name of the defini...
@ Parameter
An inlay hint that is for a parameter.
@ Type
An inlay hint that for a type annotation.
@ Designator
A hint before an element of an aggregate braced initializer list, indicating what it is initializing.
constexpr auto SymbolKindMax
std::bitset< CompletionItemKindMax+1 > CompletionItemKindBitset
@ Deprecated
Deprecated or obsolete code.
@ Unnecessary
Unused or unnecessary code.
TextDocumentSyncKind
Defines how the host (editor) should sync document changes to the language server.
@ Incremental
Documents are synced by sending the full content on open.
@ Full
Documents are synced by always sending the full content of the document.
InsertTextFormat
Defines whether the insert text in a completion item should be interpreted as plain text or a snippet...
bool fromJSON(const llvm::json::Value &Parameters, FuzzyFindRequest &Request, llvm::json::Path P)
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Some operations such as code completion produce a set of candidates.
Simplified description of a clang AST node.
std::optional< Range > range
The range of the original source file covered by this node.
std::vector< ASTNode > children
Nodes nested within this one, such as the operands of a BinaryOperator.
std::string role
The general kind of node, such as "expression" Corresponds to the base AST node type such as Expr.
std::string kind
The specific kind of node this is, such as "BinaryOperator".
std::string detail
Brief additional information, such as "||" for the particular operator.
std::string arcana
A one-line dump of detailed information about the node.
Payload for textDocument/ast request.
std::optional< Range > range
The position of the node to be dumped.
TextDocumentIdentifier textDocument
The text document.
std::optional< std::string > failureReason
Represents an incoming call, e.g. a caller of a method or constructor.
CallHierarchyItem from
The item that makes the call.
std::vector< Range > fromRanges
The range at which the calls appear.
The parameter of a callHierarchy/incomingCalls request.
Represents programming constructs like functions or constructors in the context of call hierarchy.
std::string name
The name of this item.
URIForFile uri
The resource identifier of this item.
Range range
The range enclosing this symbol not including leading / trailing whitespace but everything else,...
SymbolKind kind
The kind of this item.
std::vector< SymbolTag > tags
Tags for this item.
std::string data
An optional 'data' field, which can be used to identify a call hierarchy item in an incomingCalls or ...
std::string detail
More detaill for this item, e.g. the signature of a function.
Range selectionRange
The range that should be selected and revealed when this symbol is being picked, e....
Represents an outgoing call, e.g.
std::vector< Range > fromRanges
The range at which this item is called.
CallHierarchyItem to
The item that is called.
The parameter of a callHierarchy/outgoingCalls request.
The parameter of a textDocument/prepareCallHierarchy request.
std::string description
A human-readable string which is rendered less prominent in the user interface.
std::string label
A human-readable string describing the actual change.
std::optional< bool > needsConfirmation
A flag which indicates that user confirmation is needed before applying the change.
Clangd extension that's used in the 'compilationDatabaseChanges' in workspace/didChangeConfiguration ...
std::string workingDirectory
std::vector< std::string > compilationCommand
bool HierarchicalDocumentSymbol
Client supports hierarchical document symbols.
bool WorkDoneProgress
The client supports progress notifications.
bool DiagnosticCategory
Whether the client accepts diagnostics with category attached to it using the "category" extension.
bool CompletionLabelDetail
The client has support for completion item label details.
MarkupKind HoverContentFormat
The content format that should be used for Hover requests.
bool CodeActionStructure
Client supports CodeAction return value for textDocument/codeAction.
bool OffsetsInSignatureHelp
Client supports processing label offsets instead of a simple label string.
bool DiagnosticFixes
Whether the client accepts diagnostics with codeActions attached inline.
bool HasSignatureHelp
Client supports signature help.
bool TheiaSemanticHighlighting
Client supports Theia semantic highlighting extension.
bool SemanticTokenRefreshSupport
Whether the client implementation supports a refresh request sent from the server to the client.
bool DocumentChanges
The client supports versioned document changes for WorkspaceEdit.
bool ImplicitProgressCreation
The client supports implicit $/progress work-done progress streams, without a preceding window/workDo...
MarkupKind SignatureHelpDocumentationFormat
The documentation format that should be used for textDocument/signatureHelp.
bool CompletionFixes
Client supports completions with additionalTextEdit near the cursor.
bool RenamePrepareSupport
The client supports testing for validity of rename operations before execution.
bool CancelsStaleRequests
Whether the client claims to cancel stale requests.
std::optional< CompletionItemKindBitset > CompletionItemKinds
The supported set of CompletionItemKinds for textDocument/completion.
bool CompletionSnippets
Client supports snippets as insert text.
MarkupKind CompletionDocumentationFormat
The documentation format that should be used for textDocument/completion.
bool LineFoldingOnly
Client signals that it only supports folding complete lines.
bool InactiveRegions
Whether the client supports the textDocument/inactiveRegions notification.
std::optional< SymbolKindBitset > WorkspaceSymbolKinds
The supported set of SymbolKinds for workspace/symbol.
std::optional< std::vector< OffsetEncoding > > offsetEncoding
Supported encodings for LSP character offsets. (clangd extension).
bool ReferenceContainer
Client supports displaying a container string for results of textDocument/reference (clangd extension...
std::vector< Diagnostic > diagnostics
An array of diagnostics known on the client side overlapping the range provided to the textDocument/c...
std::vector< std::string > only
Requested kind of actions to return.
CodeActionContext context
Context carrying additional information.
TextDocumentIdentifier textDocument
The document in which the command was invoked.
Range range
The range for which the command was invoked.
A code action represents a change that can be performed in code, e.g.
static const llvm::StringLiteral INFO_KIND
bool isPreferred
Marks this as a preferred action.
static const llvm::StringLiteral REFACTOR_KIND
std::optional< std::vector< Diagnostic > > diagnostics
The diagnostics that this code action resolves.
static const llvm::StringLiteral QUICKFIX_KIND
std::optional< WorkspaceEdit > edit
The workspace edit this code action performs.
std::optional< Command > command
A command this code action executes.
std::optional< std::string > kind
The kind of the code action.
std::string title
A short, human-readable, title for this code action.
Structure to capture a description for an error code.
std::string href
An URI to open with more information about the diagnostic error.
CompletionTriggerKind triggerKind
How the completion was triggered.
std::string triggerCharacter
The trigger character (a single character) that has trigger code complete.
Additional details for a completion item label.
std::string detail
An optional string which is rendered less prominently directly after label without any spacing.
std::string description
An optional string which is rendered less prominently after CompletionItemLabelDetails....
std::string sortText
A string that should be used when comparing this item with other items.
std::optional< TextEdit > textEdit
An edit which is applied to a document when selecting this completion.
std::string filterText
A string that should be used when filtering a set of completion items.
std::string detail
A human-readable string with additional information about this item, like type or symbol information.
InsertTextFormat insertTextFormat
The format of the insert text.
CompletionItemKind kind
The kind of this completion item.
std::vector< TextEdit > additionalTextEdits
An optional array of additional text edits that are applied when selecting this completion.
std::optional< MarkupContent > documentation
A human-readable string that represents a doc-comment.
std::string insertText
A string that should be inserted to a document when selecting this completion.
bool deprecated
Indicates if this item is deprecated.
std::optional< CompletionItemLabelDetails > labelDetails
Additional details for the label.
float score
The score that clangd calculates to rank the returned completions.
std::string label
The label of this completion item.
Represents a collection of completion items to be presented in the editor.
std::vector< CompletionItem > items
The completion items.
bool isIncomplete
The list is not complete.
std::optional< int > limit
Max results to return, overriding global default.
CompletionContext context
Clangd extension: parameters configurable at any time, via the workspace/didChangeConfiguration notif...
std::map< std::string, ClangdCompileCommand > compilationDatabaseChanges
std::optional< CodeDescription > codeDescription
An optional property to describe the error code.
llvm::json::Object data
A data entry field that is preserved between a textDocument/publishDiagnostics notification and textD...
std::optional< std::vector< DiagnosticRelatedInformation > > relatedInformation
An array of related diagnostic information, e.g.
std::string code
The diagnostic's code. Can be omitted.
std::optional< std::vector< CodeAction > > codeActions
Clangd extension: code actions related to this diagnostic.
Range range
The range at which the message applies.
std::string source
A human-readable string describing the source of this diagnostic, e.g.
std::string message
The diagnostic's message.
int severity
The diagnostic's severity.
std::optional< std::string > category
The diagnostic's category.
llvm::SmallVector< DiagnosticTag, 1 > tags
Additional metadata about the diagnostic.
ConfigurationSettings settings
bool forceRebuild
Force a complete rebuild of the file, ignoring all cached state.
VersionedTextDocumentIdentifier textDocument
The document that did change.
std::optional< bool > wantDiagnostics
Forces diagnostics to be generated, or to not be generated, for this version of the file.
std::vector< TextDocumentContentChangeEvent > contentChanges
The actual content changes.
std::vector< FileEvent > changes
The actual file events.
TextDocumentIdentifier textDocument
The document that was closed.
TextDocumentItem textDocument
The document that was opened.
TextDocumentIdentifier textDocument
The document that was saved.
A document highlight is a range inside a text document which deserves special attention.
Range range
The range this highlight applies to.
friend bool operator<(const DocumentHighlight &LHS, const DocumentHighlight &RHS)
DocumentHighlightKind kind
The highlight kind, default is DocumentHighlightKind.Text.
friend bool operator==(const DocumentHighlight &LHS, const DocumentHighlight &RHS)
Parameters for the document link request.
TextDocumentIdentifier textDocument
The document to provide document links for.
A range in a text document that links to an internal or external resource, like another text document...
Range range
The range this link applies to.
friend bool operator!=(const DocumentLink &LHS, const DocumentLink &RHS)
friend bool operator==(const DocumentLink &LHS, const DocumentLink &RHS)
URIForFile target
The uri this link points to. If missing a resolve request is sent later.
TextDocumentIdentifier textDocument
Represents programming constructs like variables, classes, interfaces etc.
Range selectionRange
The range that should be selected and revealed when this symbol is being picked, e....
std::vector< DocumentSymbol > children
Children of this symbol, e.g. properties of a class.
std::string detail
More detail for this symbol, e.g the signature of a function.
std::string name
The name of this symbol.
Range range
The range enclosing this symbol not including leading/trailing whitespace but everything else like co...
bool deprecated
Indicates if this symbol is deprecated.
SymbolKind kind
The kind of this symbol.
llvm::json::Value argument
std::string command
The identifier of the actual command handler.
FileChangeType type
The change type.
URIForFile uri
The file's URI.
Clangd extension: indicates the current state of the file in clangd, sent from server via the textDoc...
URIForFile uri
The text document's URI.
std::string state
The human-readable string presents the current state of the file, can be shown in the UI (e....
TextDocumentIdentifier textDocument
Stores information about a region of code that can be folded.
static const llvm::StringLiteral REGION_KIND
static const llvm::StringLiteral COMMENT_KIND
static const llvm::StringLiteral IMPORT_KIND
std::optional< Range > range
An optional range is a range inside a text document that is used to visualize a hover,...
MarkupContent contents
The hover's content.
Parameters for the inactive regions (server-side) push notification.
TextDocumentIdentifier TextDocument
The textdocument these inactive regions belong to.
std::vector< Range > InactiveRegions
The inactive regions that should be sent.
Clangd extension: parameters configurable at initialize time.
std::optional< std::string > compilationDatabasePath
std::vector< std::string > fallbackFlags
ConfigurationSettings ConfigSettings
llvm::json::Object rawCapabilities
The same data as capabilities, but not parsed (to expose to modules).
InitializationOptions initializationOptions
User-provided initialization options.
ClientCapabilities capabilities
The capabilities provided by the client (editor or tool)
std::optional< TraceLevel > trace
The initial trace setting. If omitted trace is disabled ('off').
std::optional< int > processId
The process Id of the parent process that started the server.
std::optional< std::string > rootPath
The rootPath of the workspace.
std::optional< URIForFile > rootUri
The rootUri of the workspace.
An inlay hint label part allows for interactive and composite labels of inlay hints.
std::optional< Location > location
An optional source code location that represents this label part.
std::optional< MarkupContent > tooltip
The tooltip text when you hover over this label part.
InlayHintLabelPart(std::string value, std::optional< Location > location=std::nullopt)
std::optional< Command > command
An optional command for this label part.
std::string value
The value of this label part.
InlayHintLabelPart()=default
InlayHintKind kind
The kind of this hint.
std::string joinLabels() const
Join the label[].value together.
bool paddingRight
Render padding after the hint.
bool paddingLeft
Render padding before the hint.
Position position
The position of this hint.
std::vector< InlayHintLabelPart > label
The label of this hint.
Range range
The range of source code to which the hint applies.
A parameter literal used in inlay hint requests.
std::optional< Range > range
The visible document range for which inlay hints should be computed.
TextDocumentIdentifier textDocument
The text document.
URIForFile uri
The text document's URI.
friend bool operator==(const Location &LHS, const Location &RHS)
friend bool operator<(const Location &LHS, const Location &RHS)
friend bool operator!=(const Location &LHS, const Location &RHS)
A tree that can be used to represent memory usage of nested components while preserving the hierarchy...
friend bool operator==(const Position &LHS, const Position &RHS)
friend bool operator!=(const Position &LHS, const Position &RHS)
friend bool operator<=(const Position &LHS, const Position &RHS)
int line
Line position in a document (zero-based).
int character
Character offset on a line in a document (zero-based).
friend bool operator<(const Position &LHS, const Position &RHS)
std::string placeholder
Placeholder text to use in the editor if non-empty.
Range range
Range of the string to rename.
T value
The progress data.
llvm::json::Value token
The progress token provided by the client or server.
std::vector< Diagnostic > diagnostics
An array of diagnostic information items.
std::optional< int64_t > version
The version number of the document the diagnostics are published for.
URIForFile uri
The URI for which diagnostic information is reported.
Position start
The range's start position.
Position end
The range's end position.
friend bool operator==(const Range &LHS, const Range &RHS)
friend bool operator<(const Range &LHS, const Range &RHS)
bool contains(Position Pos) const
bool contains(Range Rng) const
friend bool operator!=(const Range &LHS, const Range &RHS)
bool includeDeclaration
Include the declaration of the current symbol.
Extends Locations returned by textDocument/references with extra info.
std::optional< std::string > containerName
clangd extension: contains the name of the function or class in which the reference occurs
TextDocumentIdentifier textDocument
The document that was opened.
Position position
The position at which this request was sent.
std::string newName
The new name of the symbol.
Parameters for the typeHierarchy/resolve request.
TypeHierarchyItem item
The item to resolve.
int resolve
The hierarchy levels to resolve. 0 indicates no level.
TypeHierarchyDirection direction
The direction of the hierarchy levels to resolve.
TextDocumentIdentifier textDocument
The text document.
std::vector< Position > positions
The positions inside the text document.
std::unique_ptr< SelectionRange > parent
The parent selection range containing this range.
Range range
The range of this selection range.
Specifies a single semantic token in the document.
unsigned length
the length of the token. A token cannot be multiline
unsigned deltaStart
token start character, relative to the previous token (relative to 0 or the previous token's start if...
unsigned deltaLine
token line number, relative to the previous token
unsigned tokenType
will be looked up in SemanticTokensLegend.tokenTypes
unsigned tokenModifiers
each set bit will be looked up in SemanticTokensLegend.tokenModifiers
Body of textDocument/semanticTokens/full/delta request.
TextDocumentIdentifier textDocument
The text document.
std::string previousResultId
The previous result id.
Describes a replacement of a contiguous range of semanticTokens.
std::vector< SemanticToken > tokens
This models LSP SemanticTokensDelta | SemanticTokens, which is the result of textDocument/semanticTok...
std::optional< std::vector< SemanticToken > > tokens
Set if we computed a fresh set of tokens.
std::optional< std::vector< SemanticTokensEdit > > edits
Set if we computed edits relative to a previous set of tokens.
Body of textDocument/semanticTokens/full request.
TextDocumentIdentifier textDocument
The text document.
A versioned set of tokens.
std::vector< SemanticToken > tokens
The actual tokens.
The show message notification is sent from a server to a client to ask the client to display a partic...
MessageType type
The message type.
std::string message
The actual message.
Represents the signature of a callable.
int activeSignature
The active signature.
std::vector< SignatureInformation > signatures
The resulting signatures.
Position argListStart
Position of the start of the argument list, including opening paren.
int activeParameter
The active parameter of the active signature.
Represents information about identifier.
std::optional< Location > definitionRange
std::string containerName
std::optional< Location > declarationRange
std::string USR
Unified Symbol Resolution identifier This is an opaque string uniquely identifying a symbol.
std::optional< Range > range
The range of the document that changed.
std::string text
The new text of the range/document.
std::optional< int > rangeLength
The length of the range that got replaced.
VersionedTextDocumentIdentifier textDocument
The text document to change.
std::vector< TextEdit > edits
The edits to be applied.
URIForFile uri
The text document's URI.
std::string languageId
The text document's language identifier.
std::optional< int64_t > version
The version number of this document (it will strictly increase after each change, including undo/redo...
URIForFile uri
The text document's URI.
std::string text
The content of the opened text document.
TextDocumentIdentifier textDocument
The text document.
Position position
The position inside the text document.
std::string newText
The string to be inserted.
ChangeAnnotationIdentifier annotationId
The actual annotation identifier (optional) If empty, then this field is nullopt.
Range range
The range of the text document to be manipulated.
Arguments for the 'applyTweak' command.
Range selection
A selection provided by the client on a textDocument/codeAction request.
URIForFile file
A file provided by the client on a textDocument/codeAction request.
std::string tweakID
ID of the tweak that should be executed. Corresponds to Tweak::id().
Used to resolve a client provided item back.
std::optional< std::vector< ResolveParams > > parents
std::nullopt means parents aren't resolved and empty is no parents.
Range range
The range enclosing this symbol not including leading/trailing whitespace but everything else,...
URIForFile uri
The resource identifier of this item.
Range selectionRange
The range that should be selected and revealed when this symbol is being picked, e....
SymbolKind kind
The kind of this item.
std::optional< std::vector< TypeHierarchyItem > > children
If this type hierarchy item is resolved, it contains the direct children of the current item.
std::optional< std::vector< TypeHierarchyItem > > parents
This is a clangd exntesion.
bool deprecated
true if the hierarchy item is deprecated.
std::optional< std::string > detail
More detail for this item, e.g. the signature of a function.
ResolveParams data
A data entry field that is preserved between a type hierarchy prepare and supertypes or subtypes requ...
std::string name
The name of this item.
The type hierarchy params is an extension of the TextDocumentPositionsParams with optional properties...
int resolve
The hierarchy levels to resolve.
TypeHierarchyDirection direction
The direction of the hierarchy levels to resolve.
friend bool operator<(const URIForFile &LHS, const URIForFile &RHS)
static llvm::Expected< URIForFile > fromURI(const URI &U, llvm::StringRef HintPath)
friend bool operator!=(const URIForFile &LHS, const URIForFile &RHS)
friend bool operator==(const URIForFile &LHS, const URIForFile &RHS)
static URIForFile canonicalize(llvm::StringRef AbsPath, llvm::StringRef TUPath)
Canonicalizes AbsPath via URI.
llvm::StringRef file() const
Retrieves absolute path to the file.
std::optional< std::int64_t > version
The version number of this document.
To start progress reporting a $/progress notification with the following payload must be sent.
bool percentage
Optional progress percentage to display (value 100 is considered 100%).
bool cancellable
Controls if a cancel button should show to allow the user to cancel the long-running operation.
std::string title
Mandatory title of the progress operation.
llvm::json::Value token
The token to be used to report progress.
Signals the end of progress reporting.
std::optional< std::string > message
Optional, a final message indicating to for example indicate the outcome of the operation.
Reporting progress is done using the following payload.
std::string title
Mandatory title of the progress operation.
std::optional< unsigned > percentage
Optional progress percentage to display (value 100 is considered 100%).
std::optional< bool > cancellable
Controls enablement state of a cancel button.
std::optional< std::string > message
Optional, more detailed associated progress message.
The edit should either provide changes or documentChanges.
std::optional< std::vector< TextDocumentEdit > > documentChanges
Versioned document edits.
std::map< std::string, ChangeAnnotation > changeAnnotations
A map of change annotations that can be referenced in AnnotatedTextEdit.
std::optional< std::map< std::string, std::vector< TextEdit > > > changes
Holds changes to existing resources.
The parameters of a Workspace Symbol Request.
std::string query
A query string to filter symbols by.
std::optional< int > limit
Max results to return, overriding global default.
static bool isEqual(const Range &LHS, const Range &RHS)
static unsigned getHashValue(const Range &Val)
static Range getEmptyKey()
static Range getTombstoneKey()