LLVM 22.0.0git
llvm::lsp Namespace Reference

Classes

struct  ClientCapabilities
struct  ClientInfo
struct  CodeAction
 A code action represents a change that can be performed in code, e.g. More...
struct  CodeActionContext
struct  CodeActionParams
struct  CompletionContext
struct  CompletionItem
struct  CompletionList
 Represents a collection of completion items to be presented in the editor. More...
struct  CompletionParams
struct  Diagnostic
struct  DiagnosticRelatedInformation
 Represents a related message and source code location for a diagnostic. More...
struct  DidChangeTextDocumentParams
struct  DidCloseTextDocumentParams
struct  DidOpenTextDocumentParams
 A range in a text document that links to an internal or external resource, like another text document or a web site. More...
struct  DocumentLinkParams
 Parameters for the document link request. More...
struct  DocumentSymbol
 Represents programming constructs like variables, classes, interfaces etc. More...
struct  DocumentSymbolParams
struct  Hover
struct  InitializeParams
struct  InlayHint
 Inlay hint information. More...
struct  InlayHintsParams
 A parameter literal used in inlay hint requests. More...
class  JSONTransport
 A transport class that performs the JSON-RPC communication with the LSP client. More...
class  JSONTransportInput
 An abstract class used by the JSONTransport to read JSON message. More...
class  JSONTransportInputOverFile
 Concrete implementation of the JSONTransportInput that reads from a file. More...
struct  Location
class  Logger
 This class represents the main interface for logging, and allows for filtering logging based on different levels of severity or significance. More...
class  LSPError
 This class models an LSP error as an llvm::Error. More...
struct  MarkupContent
class  MessageHandler
 A handler used to process the incoming transport messages. More...
struct  NoParams
struct  ParameterInformation
 A single parameter of a particular signature. More...
struct  Position
struct  PublishDiagnosticsParams
struct  Range
struct  ReferenceContext
struct  ReferenceParams
struct  SignatureHelp
 Represents the signature of a callable. More...
struct  SignatureInformation
 Represents the signature of something callable. More...
struct  TextDocumentContentChangeEvent
struct  TextDocumentIdentifier
struct  TextDocumentItem
struct  TextDocumentPositionParams
struct  TextEdit
class  URIForFile
 URI in "file" scheme for a file. More...
struct  VersionedTextDocumentIdentifier
struct  WorkspaceEdit

Typedefs

using InitializedParams = NoParams
using CompletionItemKindBitset = std::bitset<kCompletionItemKindMax + 1>
template<typename T>
using Callback = llvm::unique_function<void(llvm::Expected<T>)>
 A Callback<T> is a void function that accepts Expected<T>.
template<typename T>
using OutgoingNotification = llvm::unique_function<void(const T &)>
 An OutgoingNotification<T> is a function used for outgoing notifications send to the client.
template<typename T>
using OutgoingRequest
 An OutgoingRequest<T> is a function used for outgoing requests to send to the client.
template<typename T>
using OutgoingRequestCallback
 An OutgoingRequestCallback is invoked when an outgoing request to the client receives a response in turn.

Enumerations

enum class  ErrorCode {
  ParseError = -32700 , InvalidRequest = -32600 , MethodNotFound = -32601 , InvalidParams = -32602 ,
  InternalError = -32603 , ServerNotInitialized = -32002 , UnknownErrorCode = -32001 , RequestCancelled = -32800 ,
  ContentModified = -32801 , RequestFailed = -32803
}
enum class  TextDocumentSyncKind { None = 0 , Full = 1 , Incremental = 2 }
 Defines how the host (editor) should sync document changes to the language server. More...
enum class  TraceLevel { Off = 0 , Messages = 1 , Verbose = 2 }
enum class  MarkupKind { PlainText , Markdown }
 Describes the content type that a client supports in various result literals like Hover. More...
enum class  SymbolKind {
  File = 1 , Module = 2 , Namespace = 3 , Package = 4 ,
  Class = 5 , Method = 6 , Property = 7 , Field = 8 ,
  Constructor = 9 , Enum = 10 , Interface = 11 , Function = 12 ,
  Variable = 13 , Constant = 14 , String = 15 , Number = 16 ,
  Boolean = 17 , Array = 18 , Object = 19 , Key = 20 ,
  Null = 21 , EnumMember = 22 , Struct = 23 , Event = 24 ,
  Operator = 25 , TypeParameter = 26
}
enum class  DiagnosticSeverity {
  Undetermined = 0 , Error = 1 , Warning = 2 , Information = 3 ,
  Hint = 4
}
enum class  DiagnosticTag { Unnecessary = 1 , Deprecated = 2 }
enum class  CompletionItemKind {
  Missing = 0 , Text = 1 , Method = 2 , Function = 3 ,
  Constructor = 4 , Field = 5 , Variable = 6 , Class = 7 ,
  Interface = 8 , Module = 9 , Property = 10 , Unit = 11 ,
  Value = 12 , Enum = 13 , Keyword = 14 , Snippet = 15 ,
  Color = 16 , File = 17 , Reference = 18 , Folder = 19 ,
  EnumMember = 20 , Constant = 21 , Struct = 22 , Event = 23 ,
  Operator = 24 , TypeParameter = 25
}
 The kind of a completion entry. More...
enum class  InsertTextFormat { Missing = 0 , PlainText = 1 , Snippet = 2 }
 Defines whether the insert text in a completion item should be interpreted as plain text or a snippet. More...
enum class  CompletionTriggerKind { Invoked = 1 , TriggerCharacter = 2 , TriggerTriggerForIncompleteCompletions = 3 }
enum class  InlayHintKind { Type = 1 , Parameter = 2 }
 Inlay hint kinds. More...
enum  JSONStreamStyle { Standard , Delimited }
 The encoding style of the JSON-RPC messages (both input and output). More...

Functions

llvm::json::Value toJSON (const URIForFile &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, URIForFile &result, llvm::json::Path path)
raw_ostreamoperator<< (raw_ostream &os, const URIForFile &value)
bool fromJSON (const llvm::json::Value &value, ClientCapabilities &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, ClientInfo &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, TraceLevel &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, InitializeParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &, NoParams &, llvm::json::Path)
bool fromJSON (const llvm::json::Value &value, TextDocumentItem &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const TextDocumentIdentifier &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, TextDocumentIdentifier &result, llvm::json::Path path)
llvm::json::Value toJSON (const VersionedTextDocumentIdentifier &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, VersionedTextDocumentIdentifier &result, llvm::json::Path path)
bool fromJSON (const llvm::json::Value &value, Position &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const Position &value)
raw_ostreamoperator<< (raw_ostream &os, const Position &value)
bool fromJSON (const llvm::json::Value &value, Range &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const Range &value)
raw_ostreamoperator<< (raw_ostream &os, const Range &value)
bool fromJSON (const llvm::json::Value &value, Location &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const Location &value)
raw_ostreamoperator<< (raw_ostream &os, const Location &value)
bool fromJSON (const llvm::json::Value &value, TextDocumentPositionParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, ReferenceContext &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, ReferenceParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DidOpenTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DidCloseTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, TextDocumentContentChangeEvent &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DidChangeTextDocumentParams &result, llvm::json::Path path)
 Add support for JSON serialization.
raw_ostreamoperator<< (raw_ostream &os, MarkupKind kind)
llvm::json::Value toJSON (const MarkupContent &mc)
 Add support for JSON serialization.
llvm::json::Value toJSON (const Hover &hover)
 Add support for JSON serialization.
llvm::json::Value toJSON (const DocumentSymbol &symbol)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DocumentSymbolParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DiagnosticRelatedInformation &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const DiagnosticRelatedInformation &info)
llvm::json::Value toJSON (DiagnosticTag tag)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DiagnosticTag &result, llvm::json::Path path)
llvm::json::Value toJSON (const Diagnostic &diag)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, Diagnostic &result, llvm::json::Path path)
llvm::json::Value toJSON (const PublishDiagnosticsParams &params)
 Add support for JSON serialization.
bool operator== (const TextEdit &lhs, const TextEdit &rhs)
bool fromJSON (const llvm::json::Value &value, TextEdit &result, llvm::json::Path path)
llvm::json::Value toJSON (const TextEdit &value)
raw_ostreamoperator<< (raw_ostream &os, const TextEdit &value)
bool fromJSON (const llvm::json::Value &value, CompletionItemKind &result, llvm::json::Path path)
bool fromJSON (const llvm::json::Value &value, CompletionItemKindBitset &result, llvm::json::Path path)
CompletionItemKind adjustKindToCapability (CompletionItemKind kind, CompletionItemKindBitset &supportedCompletionItemKinds)
llvm::json::Value toJSON (const CompletionItem &value)
 Add support for JSON serialization.
raw_ostreamoperator<< (raw_ostream &os, const CompletionItem &value)
bool operator< (const CompletionItem &lhs, const CompletionItem &rhs)
llvm::json::Value toJSON (const CompletionList &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, CompletionContext &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, CompletionParams &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const ParameterInformation &value)
 Add support for JSON serialization.
llvm::json::Value toJSON (const SignatureInformation &value)
 Add support for JSON serialization.
raw_ostreamoperator<< (raw_ostream &os, const SignatureInformation &value)
llvm::json::Value toJSON (const SignatureHelp &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, DocumentLinkParams &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const DocumentLink &value)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, InlayHintsParams &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const InlayHint &)
 Add support for JSON serialization.
bool operator== (const InlayHint &lhs, const InlayHint &rhs)
bool operator< (const InlayHint &lhs, const InlayHint &rhs)
llvm::raw_ostreamoperator<< (llvm::raw_ostream &os, InlayHintKind value)
bool fromJSON (const llvm::json::Value &value, CodeActionContext &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, CodeActionParams &result, llvm::json::Path path)
 Add support for JSON serialization.
bool fromJSON (const llvm::json::Value &value, WorkspaceEdit &result, llvm::json::Path path)
 Add support for JSON serialization.
llvm::json::Value toJSON (const WorkspaceEdit &value)
llvm::json::Value toJSON (const CodeAction &)
 Add support for JSON serialization.

Variables

constexpr auto kCompletionItemKindMin
constexpr auto kCompletionItemKindMax

Typedef Documentation

◆ Callback

template<typename T>
using llvm::lsp::Callback = llvm::unique_function<void(llvm::Expected<T>)>

A Callback<T> is a void function that accepts Expected<T>.

This is accepted by functions that logically return T.

Definition at line 136 of file Transport.h.

◆ CompletionItemKindBitset

Definition at line 813 of file Protocol.h.

◆ InitializedParams

Definition at line 230 of file Protocol.h.

◆ OutgoingNotification

template<typename T>
using llvm::lsp::OutgoingNotification = llvm::unique_function<void(const T &)>

An OutgoingNotification<T> is a function used for outgoing notifications send to the client.

Definition at line 141 of file Transport.h.

◆ OutgoingRequest

template<typename T>
using llvm::lsp::OutgoingRequest
Initial value:
#define T
A Value is an JSON value of unknown type.
Definition JSON.h:290
unique_function is a type-erasing functor similar to std::function.

An OutgoingRequest<T> is a function used for outgoing requests to send to the client.

Definition at line 146 of file Transport.h.

◆ OutgoingRequestCallback

template<typename T>
using llvm::lsp::OutgoingRequestCallback
Initial value:
std::function<void(llvm::json::Value, llvm::Expected<T>)>
Tagged union holding either a T or a Error.
Definition Error.h:485

An OutgoingRequestCallback is invoked when an outgoing request to the client receives a response in turn.

It is passed the original request's ID, as well as the response result.

Definition at line 153 of file Transport.h.

Enumeration Type Documentation

◆ CompletionItemKind

enum class llvm::lsp::CompletionItemKind
strong

The kind of a completion entry.

Enumerator
Missing 
Text 
Method 
Function 
Constructor 
Field 
Variable 
Class 
Interface 
Module 
Property 
Unit 
Value 
Enum 
Keyword 
Snippet 
Color 
File 
Reference 
Folder 
EnumMember 
Constant 
Struct 
Event 
Operator 
TypeParameter 

Definition at line 778 of file Protocol.h.

◆ CompletionTriggerKind

Enumerator
Invoked 

Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e.g Ctrl+Space) or via API.

TriggerCharacter 

Completion was triggered by a trigger character specified by the triggerCharacters properties of the CompletionRegistrationOptions.

TriggerTriggerForIncompleteCompletions 

Completion was re-triggered as the current completion list is incomplete.

Definition at line 923 of file Protocol.h.

◆ DiagnosticSeverity

enum class llvm::lsp::DiagnosticSeverity
strong
Enumerator
Undetermined 

It is up to the client to interpret diagnostics as error, warning, info or hint.

Error 
Warning 
Information 
Hint 

Definition at line 677 of file Protocol.h.

◆ DiagnosticTag

enum class llvm::lsp::DiagnosticTag
strong
Enumerator
Unnecessary 
Deprecated 

Definition at line 687 of file Protocol.h.

◆ ErrorCode

enum class llvm::lsp::ErrorCode
strong
Enumerator
ParseError 
InvalidRequest 
MethodNotFound 
InvalidParams 
InternalError 
ServerNotInitialized 
UnknownErrorCode 
RequestCancelled 
ContentModified 
RequestFailed 

Definition at line 43 of file Protocol.h.

◆ InlayHintKind

enum class llvm::lsp::InlayHintKind
strong

Inlay hint kinds.

Enumerator
Type 

An inlay hint that for a type annotation.

An example of a type hint is a hint in this position: auto var ^ = expr; which shows the deduced type of the variable.

Parameter 

An inlay hint that is for a parameter.

An example of a parameter hint is a hint in this position: func(^arg); which shows the name of the corresponding parameter.

Definition at line 1092 of file Protocol.h.

◆ InsertTextFormat

enum class llvm::lsp::InsertTextFormat
strong

Defines whether the insert text in a completion item should be interpreted as plain text or a snippet.

Enumerator
Missing 
PlainText 

The primary text to be inserted is treated as a plain string.

Snippet 

The primary text to be inserted is treated as a snippet.

A snippet can define tab stops and placeholders with $1, $2 and ${3:foo}. $0 defines the final tab stop, it defaults to the end of the snippet. Placeholders with equal identifiers are linked, that is typing in one will update others too.

See also: https//github.com/Microsoft/vscode/blob/master/src/vs/editor/contrib/snippet/common/snippet.md

Definition at line 827 of file Protocol.h.

◆ JSONStreamStyle

The encoding style of the JSON-RPC messages (both input and output).

Enumerator
Standard 

Encoding per the LSP specification, with mandatory Content-Length header.

Delimited 

Messages are delimited by a '// --—' line. Comment lines start with //.

Definition at line 44 of file Transport.h.

◆ MarkupKind

enum class llvm::lsp::MarkupKind
strong

Describes the content type that a client supports in various result literals like Hover.

Enumerator
PlainText 
Markdown 

Definition at line 529 of file Protocol.h.

◆ SymbolKind

enum class llvm::lsp::SymbolKind
strong
Enumerator
File 
Module 
Namespace 
Package 
Class 
Method 
Property 
Field 
Constructor 
Enum 
Interface 
Function 
Variable 
Constant 
String 
Number 
Boolean 
Array 
Object 
Key 
Null 
EnumMember 
Struct 
Event 
Operator 
TypeParameter 

Definition at line 566 of file Protocol.h.

◆ TextDocumentSyncKind

Defines how the host (editor) should sync document changes to the language server.

Enumerator
None 

Documents should not be synced at all.

Full 

Documents are synced by always sending the full content of the document.

Incremental 

Documents are synced by sending the full content on open.

After that only incremental updates to the document are sent.

Definition at line 62 of file Protocol.h.

◆ TraceLevel

enum class llvm::lsp::TraceLevel
strong
Enumerator
Off 
Messages 
Verbose 

Definition at line 197 of file Protocol.h.

Function Documentation

◆ adjustKindToCapability()

CompletionItemKind llvm::lsp::adjustKindToCapability ( CompletionItemKind kind,
CompletionItemKindBitset & supportedCompletionItemKinds )

Definition at line 748 of file Protocol.cpp.

References Class, Enum, EnumMember, File, Folder, kCompletionItemKindMin, Struct, and Text.

◆ fromJSON() [1/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & ,
NoParams & ,
llvm::json::Path  )
inline

Definition at line 227 of file Protocol.h.

◆ fromJSON() [2/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
ClientCapabilities & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 269 of file Protocol.cpp.

References Value.

◆ fromJSON() [3/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
ClientInfo & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 300 of file Protocol.cpp.

References Value.

◆ fromJSON() [4/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CodeActionContext & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 987 of file Protocol.cpp.

References Value.

◆ fromJSON() [5/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CodeActionParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 1000 of file Protocol.cpp.

References Value.

◆ fromJSON() [6/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CompletionContext & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 842 of file Protocol.cpp.

References mapOptOrNull(), and Value.

◆ fromJSON() [7/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CompletionItemKind & result,
llvm::json::Path path )

Definition at line 736 of file Protocol.cpp.

References Text, TypeParameter, and Value.

◆ fromJSON() [8/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CompletionItemKindBitset & result,
llvm::json::Path path )

Definition at line 770 of file Protocol.cpp.

References fromJSON(), I, and Value.

◆ fromJSON() [9/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
CompletionParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 857 of file Protocol.cpp.

References fromJSON(), and Value.

◆ fromJSON() [10/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
Diagnostic & result,
llvm::json::Path path )

Definition at line 679 of file Protocol.cpp.

References mapOptOrNull(), and Value.

◆ fromJSON() [11/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DiagnosticRelatedInformation & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 629 of file Protocol.cpp.

References Value.

◆ fromJSON() [12/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DiagnosticTag & result,
llvm::json::Path path )

Definition at line 652 of file Protocol.cpp.

References I, and Value.

◆ fromJSON() [13/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DidChangeTextDocumentParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 551 of file Protocol.cpp.

References Value.

◆ fromJSON() [14/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DidCloseTextDocumentParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 502 of file Protocol.cpp.

References Value.

◆ fromJSON() [15/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DidOpenTextDocumentParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 491 of file Protocol.cpp.

References Value.

◆ fromJSON() [16/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DocumentLinkParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 924 of file Protocol.cpp.

References Value.

◆ fromJSON() [17/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
DocumentSymbolParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 619 of file Protocol.cpp.

References Value.

◆ fromJSON() [18/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
InitializeParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 334 of file Protocol.cpp.

References mapOptOrNull(), and Value.

◆ fromJSON() [19/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
InlayHintsParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 945 of file Protocol.cpp.

References Value.

◆ fromJSON() [20/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
Location & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 440 of file Protocol.cpp.

References Value.

◆ fromJSON() [21/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
Position & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 397 of file Protocol.cpp.

References Value.

◆ fromJSON() [22/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
Range & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 419 of file Protocol.cpp.

References Value.

◆ fromJSON() [23/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
ReferenceContext & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 473 of file Protocol.cpp.

References Value.

◆ fromJSON() [24/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
ReferenceParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 479 of file Protocol.cpp.

References llvm::sampleprof::Base, fromJSON(), and Value.

◆ fromJSON() [25/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TextDocumentContentChangeEvent & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 543 of file Protocol.cpp.

References Value.

◆ fromJSON() [26/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TextDocumentIdentifier & result,
llvm::json::Path path )

Definition at line 367 of file Protocol.cpp.

References Value.

◆ fromJSON() [27/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TextDocumentItem & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 351 of file Protocol.cpp.

References Value.

◆ fromJSON() [28/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TextDocumentPositionParams & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 461 of file Protocol.cpp.

References Value.

◆ fromJSON() [29/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TextEdit & result,
llvm::json::Path path )

Definition at line 713 of file Protocol.cpp.

References Value.

◆ fromJSON() [30/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
TraceLevel & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 315 of file Protocol.cpp.

References Messages, Off, Value, and Verbose.

◆ fromJSON() [31/33]

◆ fromJSON() [32/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
VersionedTextDocumentIdentifier & result,
llvm::json::Path path )

Definition at line 386 of file Protocol.cpp.

References Value.

◆ fromJSON() [33/33]

bool llvm::lsp::fromJSON ( const llvm::json::Value & value,
WorkspaceEdit & result,
llvm::json::Path path )

Add support for JSON serialization.

Definition at line 1011 of file Protocol.cpp.

References Value.

◆ operator<() [1/2]

bool llvm::lsp::operator< ( const CompletionItem & lhs,
const CompletionItem & rhs )

◆ operator<() [2/2]

bool llvm::lsp::operator< ( const InlayHint & lhs,
const InlayHint & rhs )

◆ operator<<() [1/9]

llvm::raw_ostream & llvm::lsp::operator<< ( llvm::raw_ostream & os,
InlayHintKind value )

Definition at line 972 of file Protocol.cpp.

References llvm_unreachable, Parameter, Type, and Value.

◆ operator<<() [2/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const CompletionItem & value )

Definition at line 816 of file Protocol.cpp.

References toJSON(), and Value.

◆ operator<<() [3/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const Location & value )

Definition at line 453 of file Protocol.cpp.

References Value.

◆ operator<<() [4/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const Position & value )

Definition at line 411 of file Protocol.cpp.

References Value.

◆ operator<<() [5/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const Range & value )

Definition at line 432 of file Protocol.cpp.

References Value.

◆ operator<<() [6/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const SignatureInformation & value )

Definition at line 899 of file Protocol.cpp.

References toJSON(), and Value.

◆ operator<<() [7/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const TextEdit & value )

Definition at line 726 of file Protocol.cpp.

References llvm::printEscapedString(), and Value.

◆ operator<<() [8/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
const URIForFile & value )

Definition at line 261 of file Protocol.cpp.

References Value.

◆ operator<<() [9/9]

raw_ostream & llvm::lsp::operator<< ( raw_ostream & os,
MarkupKind kind )

Definition at line 573 of file Protocol.cpp.

References toTextKind().

◆ operator==() [1/2]

bool llvm::lsp::operator== ( const InlayHint & lhs,
const InlayHint & rhs )

◆ operator==() [2/2]

bool llvm::lsp::operator== ( const TextEdit & lhs,
const TextEdit & rhs )
inline

Definition at line 764 of file Protocol.h.

References llvm::lsp::TextEdit::newText, and llvm::lsp::TextEdit::range.

◆ toJSON() [1/23]

llvm::json::Value llvm::lsp::toJSON ( const CodeAction & Value)

Add support for JSON serialization.

Definition at line 1032 of file Protocol.cpp.

References Value.

◆ toJSON() [2/23]

llvm::json::Value llvm::lsp::toJSON ( const CompletionItem & value)

Add support for JSON serialization.

Definition at line 788 of file Protocol.cpp.

References assert(), Missing, and Value.

◆ toJSON() [3/23]

llvm::json::Value llvm::lsp::toJSON ( const CompletionList & value)

Add support for JSON serialization.

Definition at line 831 of file Protocol.cpp.

References Value.

◆ toJSON() [4/23]

◆ toJSON() [5/23]

Definition at line 637 of file Protocol.cpp.

◆ toJSON() [6/23]

llvm::json::Value llvm::lsp::toJSON ( const DocumentLink & value)

Add support for JSON serialization.

Definition at line 934 of file Protocol.cpp.

References Value.

◆ toJSON() [7/23]

llvm::json::Value llvm::lsp::toJSON ( const DocumentSymbol & symbol)

Add support for JSON serialization.

Definition at line 602 of file Protocol.cpp.

◆ toJSON() [8/23]

llvm::json::Value llvm::lsp::toJSON ( const Hover & hover)

Add support for JSON serialization.

Definition at line 591 of file Protocol.cpp.

References llvm::lsp::Hover::contents, llvm::lsp::Hover::range, and toJSON().

◆ toJSON() [9/23]

llvm::json::Value llvm::lsp::toJSON ( const InlayHint & Value)

Add support for JSON serialization.

Definition at line 956 of file Protocol.cpp.

References Value.

◆ toJSON() [10/23]

llvm::json::Value llvm::lsp::toJSON ( const Location & value)

Definition at line 446 of file Protocol.cpp.

References Value.

◆ toJSON() [11/23]

llvm::json::Value llvm::lsp::toJSON ( const MarkupContent & mc)

Add support for JSON serialization.

Definition at line 577 of file Protocol.cpp.

References llvm::lsp::MarkupContent::kind, toTextKind(), and llvm::lsp::MarkupContent::value.

◆ toJSON() [12/23]

llvm::json::Value llvm::lsp::toJSON ( const ParameterInformation & value)

Add support for JSON serialization.

Definition at line 870 of file Protocol.cpp.

References assert(), and Value.

◆ toJSON() [13/23]

llvm::json::Value llvm::lsp::toJSON ( const Position & value)

Definition at line 404 of file Protocol.cpp.

References Value.

◆ toJSON() [14/23]

◆ toJSON() [15/23]

llvm::json::Value llvm::lsp::toJSON ( const Range & value)

Definition at line 425 of file Protocol.cpp.

References Value.

◆ toJSON() [16/23]

llvm::json::Value llvm::lsp::toJSON ( const SignatureHelp & value)

Add support for JSON serialization.

Definition at line 908 of file Protocol.cpp.

References assert(), and Value.

◆ toJSON() [17/23]

llvm::json::Value llvm::lsp::toJSON ( const SignatureInformation & value)

Add support for JSON serialization.

Definition at line 888 of file Protocol.cpp.

References assert(), and Value.

◆ toJSON() [18/23]

llvm::json::Value llvm::lsp::toJSON ( const TextDocumentIdentifier & value)

Add support for JSON serialization.

Definition at line 363 of file Protocol.cpp.

References Value.

◆ toJSON() [19/23]

llvm::json::Value llvm::lsp::toJSON ( const TextEdit & value)

Definition at line 719 of file Protocol.cpp.

References Value.

◆ toJSON() [20/23]

llvm::json::Value llvm::lsp::toJSON ( const URIForFile & value)

Add support for JSON serialization.

Definition at line 257 of file Protocol.cpp.

References Value.

Referenced by operator<<(), operator<<(), and toJSON().

◆ toJSON() [21/23]

Add support for JSON serialization.

Definition at line 379 of file Protocol.cpp.

References Value.

◆ toJSON() [22/23]

llvm::json::Value llvm::lsp::toJSON ( const WorkspaceEdit & value)

Definition at line 1017 of file Protocol.cpp.

References Value.

◆ toJSON() [23/23]

llvm::json::Value llvm::lsp::toJSON ( DiagnosticTag tag)

Add support for JSON serialization.

Definition at line 648 of file Protocol.cpp.

References llvm::Tag.

Variable Documentation

◆ kCompletionItemKindMax

auto llvm::lsp::kCompletionItemKindMax
constexpr
Initial value:

Definition at line 811 of file Protocol.h.

◆ kCompletionItemKindMin

auto llvm::lsp::kCompletionItemKindMin
constexpr
Initial value:

Definition at line 809 of file Protocol.h.

Referenced by adjustKindToCapability().