nixd
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
lspserver Namespace Reference

Whether current platform treats paths case insensitively. More...

Namespaces

namespace  detail
 

Classes

struct  ApplyWorkspaceEditParams
 
struct  ApplyWorkspaceEditResponse
 
struct  ASTNode
 
struct  ASTParams
 
struct  CallHierarchyIncomingCall
 Represents an incoming call, e.g. a caller of a method or constructor. More...
 
struct  CallHierarchyIncomingCallsParams
 The parameter of a callHierarchy/incomingCalls request. More...
 
struct  CallHierarchyItem
 
struct  CallHierarchyOutgoingCall
 
struct  CallHierarchyOutgoingCallsParams
 The parameter of a callHierarchy/outgoingCalls request. More...
 
struct  CallHierarchyPrepareParams
 The parameter of a textDocument/prepareCallHierarchy request. More...
 
struct  ChangeAnnotation
 
struct  ClangdCompileCommand
 
struct  ClientCapabilities
 
struct  CodeAction
 
struct  CodeActionContext
 
struct  CodeActionParams
 
struct  CodeDescription
 Structure to capture a description for an error code. More...
 
struct  Command
 
struct  CompletionContext
 
struct  CompletionItem
 
struct  CompletionList
 Represents a collection of completion items to be presented in the editor. More...
 
struct  CompletionParams
 
struct  ConfigurationItem
 
struct  ConfigurationParams
 
struct  ConfigurationSettings
 
struct  Diagnostic
 
struct  DiagnosticRelatedInformation
 
struct  DidChangeConfigurationParams
 
struct  DidChangeTextDocumentParams
 
struct  DidChangeWatchedFilesParams
 
struct  DidCloseTextDocumentParams
 
struct  DidOpenTextDocumentParams
 
struct  DidSaveTextDocumentParams
 
struct  DocumentFormattingParams
 
struct  DocumentHighlight
 
struct  DocumentLink
 
struct  DocumentLinkParams
 Parameters for the document link request. More...
 
struct  DocumentOnTypeFormattingParams
 
struct  DocumentRangeFormattingParams
 
struct  DocumentSymbol
 
struct  DocumentSymbolParams
 
class  DraftStore
 
class  Event
 An Event<T> allows events of type T to be broadcast to listeners. More...
 
struct  ExecuteCommandParams
 
struct  FileEvent
 
struct  FileStatus
 
struct  FoldingRange
 Stores information about a region of code that can be folded. More...
 
struct  FoldingRangeParams
 
struct  HandlerRegistry
 
struct  Hover
 
struct  InactiveRegionsParams
 
class  InboundPort
 
struct  InitializationOptions
 
struct  InitializeParams
 
struct  InlayHint
 Inlay hint information. More...
 
struct  InlayHintsParams
 A parameter literal used in inlay hint requests. More...
 
class  Key
 
struct  Location
 
class  Logger
 Interface to allow custom logging in clangd. More...
 
class  LoggingSession
 Only one LoggingSession can be active at a time. More...
 
struct  LSPDiagnosticCompare
 
class  LSPError
 
class  LSPServer
 
struct  MarkupContent
 
class  MessageHandler
 
struct  NoParams
 
class  OutboundPort
 
struct  ParameterInformation
 A single parameter of a particular signature. More...
 
struct  Position
 
struct  ProgressParams
 
struct  PublishDiagnosticsParams
 
struct  Range
 
struct  ReferenceContext
 
struct  ReferenceLocation
 
struct  ReferenceParams
 
struct  RenameParams
 
struct  ResolveTypeHierarchyItemParams
 Parameters for the typeHierarchy/resolve request. More...
 
struct  SelectionRange
 
struct  SelectionRangeParams
 
struct  SemanticToken
 
struct  SemanticTokens
 A versioned set of tokens. More...
 
struct  SemanticTokensDeltaParams
 
struct  SemanticTokensEdit
 Describes a replacement of a contiguous range of semanticTokens. More...
 
struct  SemanticTokensOrDelta
 
struct  SemanticTokensParams
 Body of textDocument/semanticTokens/full request. More...
 
struct  ShowMessageParams
 
struct  SignatureHelp
 Represents the signature of a callable. More...
 
struct  SignatureInformation
 Represents the signature of something callable. More...
 
class  StreamLogger
 
struct  SymbolInformation
 
struct  TextDocumentContentChangeEvent
 
struct  TextDocumentEdit
 
struct  TextDocumentIdentifier
 
struct  TextDocumentItem
 
struct  TextDocumentPositionParams
 
struct  TextEdit
 
struct  TweakArgs
 
struct  TypeHierarchyItem
 
struct  TypeHierarchyPrepareParams
 
class  URI
 
struct  URIForFile
 
class  URIScheme
 
struct  VersionedTextDocumentIdentifier
 
struct  WorkDoneProgressBegin
 
struct  WorkDoneProgressCreateParams
 
struct  WorkDoneProgressEnd
 Signals the end of progress reporting. More...
 
struct  WorkDoneProgressReport
 Reporting progress is done using the following payload. More...
 
struct  WorkspaceEdit
 
struct  WorkspaceSymbolParams
 The parameters of a Workspace Symbol Request. More...
 

Typedefs

template<typename T >
using Callback = llvm::unique_function<void(llvm::Expected<T>)>
 
using Path = std::string
 
using PathRef = llvm::StringRef
 
using ChangeAnnotationIdentifier = std::string
 
using InitializedParams = NoParams
 
using CompletionItemKindBitset = std::bitset<CompletionItemKindMax + 1>
 
using SymbolKindBitset = std::bitset<SymbolKindMax + 1>
 
typedef llvm::Registry< URISchemeURISchemeRegistry
 

Enumerations

enum class  JSONStreamStyle { Standard , Delimited }
 
enum class  ErrorCode {
  ParseError = -32700 , InvalidRequest = -32600 , MethodNotFound = -32601 , InvalidParams = -32602 ,
  InternalError = -32603 , ServerNotInitialized = -32002 , UnknownErrorCode = -32001 , RequestCancelled = -32800 ,
  ContentModified = -32801
}
 
enum class  TraceLevel { Off = 0 , Messages = 1 , Verbose = 2 }
 
enum class  TextDocumentSyncKind { None = 0 , Full = 1 , Incremental = 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  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
}
 A symbol kind. More...
 
enum class  OffsetEncoding { UnsupportedEncoding , UTF16 , UTF8 , UTF32 }
 
enum class  MarkupKind { PlainText , Markdown }
 
enum class  MessageType { Error = 1 , Warning = 2 , Info = 3 , Log = 4 }
 
enum class  FileChangeType { Created = 1 , Changed = 2 , Deleted = 3 }
 
enum  DiagnosticTag { Unnecessary = 1 , Deprecated = 2 }
 
enum class  CompletionTriggerKind { Invoked = 1 , TriggerCharacter = 2 , TriggerTriggerForIncompleteCompletions = 3 }
 
enum class  InsertTextFormat { Missing = 0 , PlainText = 1 , Snippet = 2 }
 
enum class  DocumentHighlightKind { Text = 1 , Read = 2 , Write = 3 }
 
enum class  TypeHierarchyDirection { Children = 0 , Parents = 1 , Both = 2 }
 
enum class  SymbolTag { Deprecated = 1 }
 
enum class  InlayHintKind { Type = 1 , Parameter = 2 , Designator = 3 }
 Inlay hint kinds. More...
 

Functions

template<typename... Ts>
void elog (const char *Fmt, Ts &&...Vals)
 
template<typename... Ts>
void log (const char *Fmt, Ts &&...Vals)
 
template<typename... Ts>
void vlog (const char *Fmt, Ts &&...Vals)
 
template<typename... Ts>
llvm::Error error (std::error_code EC, const char *Fmt, Ts &&...Vals)
 
template<typename... Ts>
llvm::Error error (const char *Fmt, Ts &&...Vals)
 
llvm::Error error (std::error_code EC, std::string Msg)
 
llvm::Error error (std::string Msg)
 
template<typename T >
llvm::Expected< TparseParam (const llvm::json::Value &Raw, llvm::StringRef PayloadName, llvm::StringRef PayloadKind)
 
template<>
llvm::Expected< llvm::json::Value > parseParam (const llvm::json::Value &Raw, llvm::StringRef PayloadName, llvm::StringRef PayloadKind)
 
std::string maybeCaseFoldPath (PathRef Path)
 
bool pathEqual (PathRef, PathRef)
 
bool pathStartsWith (PathRef Ancestor, PathRef Path, llvm::sys::path::Style Style=llvm::sys::path::Style::native)
 
PathRef absoluteParent (PathRef Path)
 
llvm::json::Value toJSON (const URIForFile &U)
 Serialize/deserialize URIForFile to/from a string URI.
 
bool fromJSON (const llvm::json::Value &, URIForFile &, llvm::json::Path)
 
llvm::json::Value toJSON (const TextDocumentIdentifier &)
 
bool fromJSON (const llvm::json::Value &, TextDocumentIdentifier &, llvm::json::Path)
 
llvm::json::Value toJSON (const VersionedTextDocumentIdentifier &)
 
bool fromJSON (const llvm::json::Value &, VersionedTextDocumentIdentifier &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, Position &, llvm::json::Path)
 
llvm::json::Value toJSON (const Position &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const Position &)
 
bool fromJSON (const llvm::json::Value &, Range &, llvm::json::Path)
 
llvm::json::Value toJSON (const Range &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const Range &)
 
llvm::json::Value toJSON (const Location &)
 
bool fromJSON (const llvm::json::Value &, Location &, llvm::json::Path)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const Location &)
 
llvm::json::Value toJSON (const ReferenceLocation &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const ReferenceLocation &)
 
bool operator== (const TextEdit &L, const TextEdit &R)
 
bool fromJSON (const llvm::json::Value &, TextEdit &, llvm::json::Path)
 
llvm::json::Value toJSON (const TextEdit &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const TextEdit &)
 
bool fromJSON (const llvm::json::Value &, ChangeAnnotation &, llvm::json::Path)
 
llvm::json::Value toJSON (const ChangeAnnotation &)
 
bool fromJSON (const llvm::json::Value &, TextDocumentEdit &, llvm::json::Path)
 
llvm::json::Value toJSON (const TextDocumentEdit &)
 
bool fromJSON (const llvm::json::Value &, TextDocumentItem &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &E, TraceLevel &Out, llvm::json::Path)
 
llvm::json::Value toJSON (const NoParams &)
 
bool fromJSON (const llvm::json::Value &, NoParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CompletionItemKind &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CompletionItemKindBitset &, llvm::json::Path)
 
CompletionItemKind adjustKindToCapability (CompletionItemKind Kind, CompletionItemKindBitset &SupportedCompletionItemKinds)
 
bool fromJSON (const llvm::json::Value &, SymbolKind &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, SymbolKindBitset &, llvm::json::Path)
 
SymbolKind adjustKindToCapability (SymbolKind Kind, SymbolKindBitset &supportedSymbolKinds)
 
llvm::json::Value toJSON (const OffsetEncoding &)
 
bool fromJSON (const llvm::json::Value &, OffsetEncoding &, llvm::json::Path)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, OffsetEncoding)
 
bool fromJSON (const llvm::json::Value &, MarkupKind &, llvm::json::Path)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, MarkupKind)
 
bool fromJSON (const llvm::json::Value &, ClientCapabilities &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, ClangdCompileCommand &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, ConfigurationSettings &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, InitializationOptions &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, InitializeParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const WorkDoneProgressCreateParams &P)
 
template<typename T >
llvm::json::Value toJSON (const ProgressParams< T > &P)
 
llvm::json::Value toJSON (const WorkDoneProgressBegin &)
 
llvm::json::Value toJSON (const WorkDoneProgressReport &)
 
llvm::json::Value toJSON (const WorkDoneProgressEnd &)
 
llvm::json::Value toJSON (const MessageType &)
 
llvm::json::Value toJSON (const ShowMessageParams &)
 
bool fromJSON (const llvm::json::Value &, DidOpenTextDocumentParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DidCloseTextDocumentParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DidSaveTextDocumentParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, TextDocumentContentChangeEvent &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DidChangeTextDocumentParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &E, FileChangeType &Out, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, FileEvent &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DidChangeWatchedFilesParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DidChangeConfigurationParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DocumentRangeFormattingParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DocumentOnTypeFormattingParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DocumentFormattingParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, DocumentSymbolParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const DiagnosticRelatedInformation &)
 
llvm::json::Value toJSON (DiagnosticTag Tag)
 
llvm::json::Value toJSON (const CodeDescription &)
 
llvm::json::Value toJSON (const Diagnostic &)
 
bool fromJSON (const llvm::json::Value &, Diagnostic &, llvm::json::Path)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const Diagnostic &)
 
llvm::json::Value toJSON (const PublishDiagnosticsParams &)
 
bool fromJSON (const llvm::json::Value &, CodeActionContext &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CodeActionParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, WorkspaceEdit &, llvm::json::Path)
 
llvm::json::Value toJSON (const WorkspaceEdit &WE)
 
bool fromJSON (const llvm::json::Value &, TweakArgs &, llvm::json::Path)
 
llvm::json::Value toJSON (const TweakArgs &A)
 
bool fromJSON (const llvm::json::Value &, ExecuteCommandParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const Command &C)
 
llvm::json::Value toJSON (const CodeAction &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &O, const DocumentSymbol &S)
 
llvm::json::Value toJSON (const DocumentSymbol &S)
 
llvm::json::Value toJSON (const SymbolInformation &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const SymbolInformation &)
 
bool fromJSON (const llvm::json::Value &, WorkspaceSymbolParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const ApplyWorkspaceEditParams &)
 
bool fromJSON (const llvm::json::Value &, ApplyWorkspaceEditResponse &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, TextDocumentPositionParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CompletionContext &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CompletionParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const MarkupContent &MC)
 
bool fromJSON (const llvm::json::Value &, MarkupContent &, llvm::json::Path)
 
llvm::json::Value toJSON (const Hover &H)
 
llvm::json::Value toJSON (const CompletionItem &)
 
bool fromJSON (const llvm::json::Value &, CompletionItem &, llvm::json::Path)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const CompletionItem &)
 
bool operator< (const CompletionItem &, const CompletionItem &)
 
llvm::json::Value toJSON (const CompletionList &)
 
llvm::json::Value toJSON (const ParameterInformation &)
 
llvm::json::Value toJSON (const SignatureInformation &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const SignatureInformation &)
 
llvm::json::Value toJSON (const SignatureHelp &)
 
bool fromJSON (const llvm::json::Value &, RenameParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const DocumentHighlight &DH)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const DocumentHighlight &)
 
bool fromJSON (const llvm::json::Value &E, TypeHierarchyDirection &Out, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, TypeHierarchyPrepareParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const TypeHierarchyItem::ResolveParams &)
 
bool fromJSON (const TypeHierarchyItem::ResolveParams &)
 
llvm::json::Value toJSON (const TypeHierarchyItem &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const TypeHierarchyItem &)
 
bool fromJSON (const llvm::json::Value &, TypeHierarchyItem &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, ResolveTypeHierarchyItemParams &, llvm::json::Path)
 
llvm::json::Value toJSON (SymbolTag)
 
llvm::json::Value toJSON (const CallHierarchyItem &)
 
bool fromJSON (const llvm::json::Value &, CallHierarchyItem &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &, CallHierarchyIncomingCallsParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const CallHierarchyIncomingCall &)
 
bool fromJSON (const llvm::json::Value &, CallHierarchyOutgoingCallsParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const CallHierarchyOutgoingCall &)
 
bool fromJSON (const llvm::json::Value &, InlayHintsParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const InlayHintKind &)
 
llvm::json::Value toJSON (const InlayHint &)
 
bool operator== (const InlayHint &, const InlayHint &)
 
bool operator< (const InlayHint &, const InlayHint &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, InlayHintKind)
 
bool fromJSON (const llvm::json::Value &, ReferenceParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const FileStatus &)
 
bool operator== (const SemanticToken &, const SemanticToken &)
 
llvm::json::Value toJSON (const SemanticTokens &)
 
bool fromJSON (const llvm::json::Value &, SemanticTokensParams &, llvm::json::Path)
 
bool fromJSON (const llvm::json::Value &Params, SemanticTokensDeltaParams &R, llvm::json::Path)
 
llvm::json::Value toJSON (const SemanticTokensEdit &)
 
llvm::json::Value toJSON (const SemanticTokensOrDelta &)
 
llvm::json::Value toJSON (const InactiveRegionsParams &InactiveRegions)
 
bool fromJSON (const llvm::json::Value &, SelectionRangeParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const SelectionRange &)
 
bool fromJSON (const llvm::json::Value &, DocumentLinkParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const DocumentLink &DocumentLink)
 
bool fromJSON (const llvm::json::Value &, FoldingRangeParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const FoldingRange &Range)
 
bool fromJSON (const llvm::json::Value &, ASTParams &, llvm::json::Path)
 
llvm::json::Value toJSON (const ASTNode &)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &, const ASTNode &)
 
llvm::json::Value toJSON (const ConfigurationItem &)
 
llvm::json::Value toJSON (const ConfigurationParams &)
 
size_t lspLength (llvm::StringRef Code)
 
llvm::Expected< size_tpositionToOffset (llvm::StringRef Code, Position P, bool AllowColumnsBeyondLineLength=true)
 
Position offsetToPosition (llvm::StringRef Code, size_t Offset)
 
void unionRanges (Range &A, Range B)
 
llvm::Error applyChange (std::string &Contents, const TextDocumentContentChangeEvent &Change)
 Apply an incremental update to a text document.
 
llvm::StringSet collectWords (llvm::StringRef Content)
 
llvm::Error decodeError (const llvm::json::Object &O)
 Decode the given JSON object into an error.
 
bool readLine (int fd, const std::atomic< bool > &Close, llvm::SmallString< 128 > &Line)
 
llvm::raw_ostream & operator<< (llvm::raw_ostream &OS, const URIForFile &U)
 
bool fromJSON (const llvm::json::Value &Params, TypeHierarchyItem::ResolveParams &RP, llvm::json::Path P)
 
bool fromJSON (const llvm::json::Value &Params, ReferenceContext &R, llvm::json::Path P)
 

Variables

constexpr auto CompletionItemKindMin
 
constexpr auto CompletionItemKindMax
 
constexpr auto SymbolKindMin = static_cast<size_t>(SymbolKind::File)
 
constexpr auto SymbolKindMax = static_cast<size_t>(SymbolKind::TypeParameter)
 
Key< OffsetEncodingkCurrentOffsetEncoding
 
constexpr unsigned SemanticTokenEncodingSize = 5
 

Detailed Description

Whether current platform treats paths case insensitively.

Typedef Documentation

◆ Callback

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

A Callback<T> is a void function that accepts Expected<T>. This is accepted by ClangdServer functions that logically return T.

Definition at line 14 of file Function.h.

◆ ChangeAnnotationIdentifier

Definition at line 223 of file lspserver/include/lspserver/Protocol.h.

◆ CompletionItemKindBitset

Definition at line 354 of file lspserver/include/lspserver/Protocol.h.

◆ InitializedParams

Definition at line 303 of file lspserver/include/lspserver/Protocol.h.

◆ Path

using lspserver::Path = std::string

A typedef to represent a file path. Used solely for more descriptive signatures.

Definition at line 24 of file Path.h.

◆ PathRef

using lspserver::PathRef = llvm::StringRef

A typedef to represent a ref to file path. Used solely for more descriptive signatures.

Definition at line 27 of file Path.h.

◆ SymbolKindBitset

Definition at line 393 of file lspserver/include/lspserver/Protocol.h.

◆ URISchemeRegistry

By default, a "file" scheme is supported where URI paths are always absolute in the file system.

Definition at line 121 of file URI.h.

Enumeration Type Documentation

◆ CompletionItemKind

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 320 of file lspserver/include/lspserver/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 1171 of file lspserver/include/lspserver/Protocol.h.

◆ DiagnosticTag

Enumerator
Unnecessary 

Unused or unnecessary code.

Clients are allowed to render diagnostics with this tag faded out instead of having an error squiggle.

Deprecated 

Deprecated or obsolete code.

Clients are allowed to rendered diagnostics with this tag strike through.

Definition at line 870 of file lspserver/include/lspserver/Protocol.h.

◆ DocumentHighlightKind

Enumerator
Text 
Read 
Write 

Definition at line 1381 of file lspserver/include/lspserver/Protocol.h.

◆ ErrorCode

Enumerator
ParseError 
InvalidRequest 
MethodNotFound 
InvalidParams 
InternalError 
ServerNotInitialized 
UnknownErrorCode 
RequestCancelled 
ContentModified 

Definition at line 22 of file lspserver/include/lspserver/Protocol.h.

◆ FileChangeType

Enumerator
Created 

The file got created.

Changed 

The file got changed.

Deleted 

The file got deleted.

Definition at line 782 of file lspserver/include/lspserver/Protocol.h.

◆ InlayHintKind

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.

Designator 

A hint before an element of an aggregate braced initializer list, indicating what it is initializing. Pair{^1, ^2}; Uses designator syntax, e.g. .first:. This is a clangd extension.

Definition at line 1584 of file lspserver/include/lspserver/Protocol.h.

◆ InsertTextFormat

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/main/src/vs/editor/contrib/snippet/snippet.md

Definition at line 1219 of file lspserver/include/lspserver/Protocol.h.

◆ JSONStreamStyle

Enumerator
Standard 
Delimited 

Definition at line 13 of file Connection.h.

◆ MarkupKind

Enumerator
PlainText 
Markdown 

Definition at line 415 of file lspserver/include/lspserver/Protocol.h.

◆ MessageType

Enumerator
Error 

An error message.

Warning 

A warning message.

Info 

An information message.

Log 

A log message.

Definition at line 702 of file lspserver/include/lspserver/Protocol.h.

◆ OffsetEncoding

Enumerator
UnsupportedEncoding 
UTF16 
UTF8 
UTF32 

Definition at line 399 of file lspserver/include/lspserver/Protocol.h.

◆ SymbolKind

A symbol kind.

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 362 of file lspserver/include/lspserver/Protocol.h.

◆ SymbolTag

Enumerator
Deprecated 

Definition at line 1493 of file lspserver/include/lspserver/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 send.

Definition at line 307 of file lspserver/include/lspserver/Protocol.h.

◆ TraceLevel

Enumerator
Off 
Messages 
Verbose 

Definition at line 291 of file lspserver/include/lspserver/Protocol.h.

◆ TypeHierarchyDirection

Enumerator
Children 
Parents 
Both 

Definition at line 1409 of file lspserver/include/lspserver/Protocol.h.

Function Documentation

◆ absoluteParent()

PathRef lspserver::absoluteParent ( PathRef Path)

Variant of parent_path that operates only on absolute paths. Unlike parent_path doesn't consider C: a parent of C:.

◆ adjustKindToCapability() [1/2]

CompletionItemKind lspserver::adjustKindToCapability ( CompletionItemKind Kind,
CompletionItemKindBitset & SupportedCompletionItemKinds )

◆ adjustKindToCapability() [2/2]

SymbolKind lspserver::adjustKindToCapability ( SymbolKind Kind,
SymbolKindBitset & supportedSymbolKinds )

Definition at line 282 of file lspserver/src/Protocol.cpp.

References Class, Enum, EnumMember, fromJSON(), String, Struct, and SymbolKindMin.

◆ applyChange()

llvm::Error lspserver::applyChange ( std::string & Contents,
const TextDocumentContentChangeEvent & Change )

Apply an incremental update to a text document.

Definition at line 190 of file SourceCode.cpp.

References error(), fromJSON(), lspLength(), and positionToOffset().

◆ collectWords()

llvm::StringSet lspserver::collectWords ( llvm::StringRef Content)

Collects words from the source code. Unlike collectIdentifiers:

  • also finds text in comments:
  • splits text into words
  • drops stopwords like "get" and "for"

◆ decodeError()

llvm::Error lspserver::decodeError ( const llvm::json::Object & O)

Decode the given JSON object into an error.

Definition at line 49 of file Connection.cpp.

Referenced by lspserver::InboundPort::dispatch().

◆ elog()

template<typename... Ts>
void lspserver::elog ( const char * Fmt,
Ts &&... Vals )

◆ error() [1/4]

template<typename... Ts>
llvm::Error lspserver::error ( const char * Fmt,
Ts &&... Vals )

Definition at line 76 of file Logger.h.

References lspserver::detail::error(), fromJSON(), and lspserver::detail::wrap().

◆ error() [2/4]

template<typename... Ts>
llvm::Error lspserver::error ( std::error_code EC,
const char * Fmt,
Ts &&... Vals )

◆ error() [3/4]

llvm::Error lspserver::error ( std::error_code EC,
std::string Msg )
inline

Definition at line 82 of file Logger.h.

References lspserver::detail::error(), and fromJSON().

◆ error() [4/4]

llvm::Error lspserver::error ( std::string Msg)
inline

Definition at line 86 of file Logger.h.

References lspserver::detail::error(), and fromJSON().

◆ fromJSON() [1/68]

bool lspserver::fromJSON ( const llvm::json::Value & Response,
ApplyWorkspaceEditResponse & R,
llvm::json::Path P )

◆ fromJSON() [2/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ASTParams & R,
llvm::json::Path P )

◆ fromJSON() [3/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CallHierarchyIncomingCallsParams & C,
llvm::json::Path P )

Definition at line 1346 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [4/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CallHierarchyItem & I,
llvm::json::Path P )

Definition at line 1333 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [5/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CallHierarchyOutgoingCallsParams & C,
llvm::json::Path P )

Definition at line 1356 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [6/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ChangeAnnotation & R,
llvm::json::Path P )

◆ fromJSON() [7/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ClangdCompileCommand & CDbUpdate,
llvm::json::Path P )

Definition at line 1200 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [8/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ClientCapabilities & R,
llvm::json::Path P )

Definition at line 300 of file lspserver/src/Protocol.cpp.

References lspserver::ClientCapabilities::CancelsStaleRequests, lspserver::ClientCapabilities::ChangeAnnotation, lspserver::ClientCapabilities::CodeActionStructure, lspserver::ClientCapabilities::CompletionDocumentationFormat, lspserver::ClientCapabilities::CompletionFixes, lspserver::ClientCapabilities::CompletionItemKinds, lspserver::ClientCapabilities::CompletionSnippets, lspserver::ClientCapabilities::DiagnosticCategory, lspserver::ClientCapabilities::DiagnosticFixes, lspserver::ClientCapabilities::DiagnosticRelatedInformation, lspserver::ClientCapabilities::DocumentChanges, fromJSON(), lspserver::ClientCapabilities::HasSignatureHelp, lspserver::ClientCapabilities::HierarchicalDocumentSymbol, lspserver::ClientCapabilities::HoverContentFormat, lspserver::ClientCapabilities::ImplicitProgressCreation, lspserver::ClientCapabilities::InactiveRegions, Info, lspserver::ClientCapabilities::LineFoldingOnly, lspserver::ClientCapabilities::offsetEncoding, lspserver::ClientCapabilities::OffsetsInSignatureHelp, Parameter, lspserver::ClientCapabilities::ReferenceContainer, lspserver::ClientCapabilities::RenamePrepareSupport, lspserver::ClientCapabilities::SemanticTokenRefreshSupport, lspserver::ClientCapabilities::SemanticTokens, lspserver::ClientCapabilities::SignatureHelpDocumentationFormat, lspserver::ClientCapabilities::TheiaSemanticHighlighting, lspserver::ClientCapabilities::WorkDoneProgress, lspserver::ClientCapabilities::WorkspaceConfiguration, and lspserver::ClientCapabilities::WorkspaceSymbolKinds.

◆ fromJSON() [9/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CodeActionContext & R,
llvm::json::Path P )

◆ fromJSON() [10/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CodeActionParams & R,
llvm::json::Path P )

◆ fromJSON() [11/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CompletionContext & R,
llvm::json::Path P )

◆ fromJSON() [12/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CompletionItem & R,
llvm::json::Path P )

◆ fromJSON() [13/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
CompletionItemKind & Out,
llvm::json::Path P )

Definition at line 942 of file lspserver/src/Protocol.cpp.

References fromJSON(), Text, and TypeParameter.

◆ fromJSON() [14/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
CompletionItemKindBitset & Out,
llvm::json::Path P )

Definition at line 976 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [15/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
CompletionParams & R,
llvm::json::Path P )

◆ fromJSON() [16/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ConfigurationSettings & S,
llvm::json::Path P )

Definition at line 1207 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [17/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
Diagnostic & R,
llvm::json::Path P )

◆ fromJSON() [18/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidChangeConfigurationParams & CCP,
llvm::json::Path P )

Definition at line 1194 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [19/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidChangeTextDocumentParams & R,
llvm::json::Path P )

◆ fromJSON() [20/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidChangeWatchedFilesParams & R,
llvm::json::Path P )

◆ fromJSON() [21/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidCloseTextDocumentParams & R,
llvm::json::Path P )

◆ fromJSON() [22/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidOpenTextDocumentParams & R,
llvm::json::Path P )

◆ fromJSON() [23/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DidSaveTextDocumentParams & R,
llvm::json::Path P )

◆ fromJSON() [24/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DocumentFormattingParams & R,
llvm::json::Path P )

◆ fromJSON() [25/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DocumentLinkParams & R,
llvm::json::Path P )

◆ fromJSON() [26/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DocumentOnTypeFormattingParams & R,
llvm::json::Path P )

◆ fromJSON() [27/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DocumentRangeFormattingParams & R,
llvm::json::Path P )

◆ fromJSON() [28/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
DocumentSymbolParams & R,
llvm::json::Path P )

◆ fromJSON() [29/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ExecuteCommandParams & R,
llvm::json::Path P )

◆ fromJSON() [30/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
FileEvent & R,
llvm::json::Path P )

◆ fromJSON() [31/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
FoldingRangeParams & R,
llvm::json::Path P )

◆ fromJSON() [32/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
InitializationOptions & Opts,
llvm::json::Path P )

Definition at line 1216 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [33/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
InitializeParams & R,
llvm::json::Path P )

◆ fromJSON() [34/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
InlayHintsParams & R,
llvm::json::Path P )

◆ fromJSON() [35/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
Location & R,
llvm::json::Path P )

◆ fromJSON() [36/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
MarkupContent & R,
llvm::json::Path P )

◆ fromJSON() [37/68]

bool lspserver::fromJSON ( const llvm::json::Value & V,
MarkupKind & K,
llvm::json::Path P )

Definition at line 893 of file lspserver/src/Protocol.cpp.

References fromJSON(), Markdown, and PlainText.

◆ fromJSON() [38/68]

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

Definition at line 300 of file lspserver/include/lspserver/Protocol.h.

◆ fromJSON() [39/68]

bool lspserver::fromJSON ( const llvm::json::Value & V,
OffsetEncoding & OE,
llvm::json::Path P )

Definition at line 1432 of file lspserver/src/Protocol.cpp.

References fromJSON(), UnsupportedEncoding, UTF16, UTF32, and UTF8.

◆ fromJSON() [40/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
Position & R,
llvm::json::Path P )

◆ fromJSON() [41/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
Range & R,
llvm::json::Path P )

◆ fromJSON() [42/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ReferenceParams & R,
llvm::json::Path P )

Definition at line 1307 of file lspserver/src/Protocol.cpp.

References lspserver::ReferenceParams::context, and fromJSON().

◆ fromJSON() [43/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
RenameParams & R,
llvm::json::Path P )

◆ fromJSON() [44/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ResolveTypeHierarchyItemParams & R,
llvm::json::Path P )

◆ fromJSON() [45/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
SelectionRangeParams & S,
llvm::json::Path P )

Definition at line 1448 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [46/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
SemanticTokensParams & R,
llvm::json::Path P )

◆ fromJSON() [47/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
SymbolKind & Out,
llvm::json::Path P )

Definition at line 258 of file lspserver/src/Protocol.cpp.

References File, fromJSON(), and TypeParameter.

◆ fromJSON() [48/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
SymbolKindBitset & Out,
llvm::json::Path P )

Definition at line 269 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [49/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextDocumentContentChangeEvent & R,
llvm::json::Path P )

◆ fromJSON() [50/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextDocumentEdit & R,
llvm::json::Path P )

◆ fromJSON() [51/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextDocumentIdentifier & R,
llvm::json::Path P )

◆ fromJSON() [52/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextDocumentItem & R,
llvm::json::Path P )

◆ fromJSON() [53/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextDocumentPositionParams & R,
llvm::json::Path P )

◆ fromJSON() [54/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TextEdit & R,
llvm::json::Path P )

◆ fromJSON() [55/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TweakArgs & A,
llvm::json::Path P )

Definition at line 824 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [56/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TypeHierarchyItem & I,
llvm::json::Path P )

Definition at line 1278 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [57/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TypeHierarchyPrepareParams & R,
llvm::json::Path P )

◆ fromJSON() [58/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
URIForFile & R,
llvm::json::Path P )

Definition at line 63 of file lspserver/src/Protocol.cpp.

References fromJSON(), lspserver::URIForFile::fromURI(), and lspserver::URI::parse().

Referenced by lspserver::HandlerRegistry::addCommand(), lspserver::DraftStore::addDraft(), lspserver::HandlerRegistry::addMethod(), lspserver::HandlerRegistry::addNotification(), adjustKindToCapability(), adjustKindToCapability(), applyChange(), lspserver::DraftStore::asVFS(), lspserver::Event< T >::broadcast(), lspserver::OutboundPort::call(), lspserver::URIForFile::canonicalize(), lspserver::Range::contains(), lspserver::URI::create(), lspserver::URI::create(), lspserver::URI::createFile(), lspserver::detail::debugType(), lspserver::DraftStore::decodeVersion(), lspserver::InboundPort::dispatch(), elog(), lspserver::DraftStore::encodeVersion(), error(), error(), error(), lspserver::detail::error(), error(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), fromJSON(), lspserver::URIForFile::fromURI(), lspserver::DraftStore::getActiveFiles(), lspserver::DraftStore::getDraft(), nixd::getLSPSeverity(), lspserver::URI::includeSpelling(), lspserver::Logger::indicator(), log(), lspserver::StreamLogger::log(), lspserver::LSPError::log(), lspserver::detail::log(), lspserver::LoggingSession::LoggingSession(), lspserver::detail::logImpl(), lspserver::InboundPort::loop(), lspLength(), lspserver::OutboundPort::notify(), lspserver::Event< T >::observe(), offsetToPosition(), operator<(), operator<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator<<(), operator==(), operator==(), operator==(), lspserver::URI::parse(), parseParam(), positionToOffset(), lspserver::InboundPort::readDelimitedMessage(), readLine(), lspserver::InboundPort::readMessage(), lspserver::InboundPort::readStandardMessage(), lspserver::DraftStore::removeDraft(), lspserver::OutboundPort::reply(), lspserver::URI::resolve(), lspserver::URI::resolve(), lspserver::URI::resolvePath(), lspserver::OutboundPort::sendMessage(), lspserver::LSPServer::switchStreamStyle(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), toJSON(), nixd::toLSPTags(), lspserver::URI::toString(), lspserver::URI::URI(), vlog(), lspserver::detail::wrap(), lspserver::detail::wrap(), lspserver::Event< T >::~Event(), and lspserver::LoggingSession::~LoggingSession().

◆ fromJSON() [59/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
VersionedTextDocumentIdentifier & R,
llvm::json::Path P )

◆ fromJSON() [60/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
WorkspaceEdit & R,
llvm::json::Path P )

◆ fromJSON() [61/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
WorkspaceSymbolParams & R,
llvm::json::Path P )

◆ fromJSON() [62/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
FileChangeType & Out,
llvm::json::Path P )

Definition at line 545 of file lspserver/src/Protocol.cpp.

References Created, Deleted, and fromJSON().

◆ fromJSON() [63/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
TraceLevel & Out,
llvm::json::Path P )

Definition at line 240 of file lspserver/src/Protocol.cpp.

References fromJSON(), Messages, Off, and Verbose.

◆ fromJSON() [64/68]

bool lspserver::fromJSON ( const llvm::json::Value & E,
TypeHierarchyDirection & Out,
llvm::json::Path P )

Definition at line 1228 of file lspserver/src/Protocol.cpp.

References Both, Children, and fromJSON().

◆ fromJSON() [65/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
ReferenceContext & R,
llvm::json::Path P )

◆ fromJSON() [66/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
SemanticTokensDeltaParams & R,
llvm::json::Path P )

◆ fromJSON() [67/68]

bool lspserver::fromJSON ( const llvm::json::Value & Params,
TypeHierarchyItem::ResolveParams & RP,
llvm::json::Path P )

Definition at line 1260 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ fromJSON() [68/68]

bool lspserver::fromJSON ( const TypeHierarchyItem::ResolveParams & )

◆ log()

template<typename... Ts>
void lspserver::log ( const char * Fmt,
Ts &&... Vals )

Definition at line 58 of file Logger.h.

References fromJSON(), lspserver::Logger::Info, and lspserver::detail::log().

Referenced by nixd::EvalClient::onReady().

◆ lspLength()

size_t lspserver::lspLength ( llvm::StringRef Code)

Definition at line 50 of file SourceCode.cpp.

References fromJSON(), UnsupportedEncoding, UTF16, UTF32, and UTF8.

Referenced by applyChange(), and offsetToPosition().

◆ maybeCaseFoldPath()

std::string lspserver::maybeCaseFoldPath ( PathRef Path)

◆ offsetToPosition()

Position lspserver::offsetToPosition ( llvm::StringRef Code,
size_t Offset )

Turn an offset in Code into a [line, column] pair. The offset must be in range [0, Code.size()].

Definition at line 144 of file SourceCode.cpp.

References lspserver::Position::character, fromJSON(), lspserver::Position::line, and lspLength().

Referenced by nixd::toLSPPosition().

◆ operator<() [1/2]

◆ operator<() [2/2]

Definition at line 1398 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [1/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const ASTNode & Root )

Definition at line 1522 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [2/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const CompletionItem & I )

Definition at line 1041 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ operator<<() [3/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const Diagnostic & D )

◆ operator<<() [4/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const DocumentHighlight & V )

Definition at line 1184 of file lspserver/src/Protocol.cpp.

References fromJSON(), Read, and Write.

◆ operator<<() [5/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const Location & L )

Definition at line 163 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [6/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const Position & P )

◆ operator<<() [7/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const Range & R )

◆ operator<<() [8/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const ReferenceLocation & L )

Definition at line 177 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [9/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const SignatureInformation & I )

Definition at line 1083 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ operator<<() [10/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const SymbolInformation & SI )

Definition at line 746 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ operator<<() [11/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const TextEdit & TE )

Definition at line 234 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [12/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const TypeHierarchyItem & I )

Definition at line 1249 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ operator<<() [13/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
InlayHintKind Kind )

Definition at line 1403 of file lspserver/src/Protocol.cpp.

References Designator, fromJSON(), Parameter, and Type.

◆ operator<<() [14/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
OffsetEncoding Enc )

Definition at line 1444 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [15/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & O,
const DocumentSymbol & S )

Definition at line 785 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ operator<<() [16/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
const URIForFile & U )

Definition at line 90 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator<<() [17/17]

llvm::raw_ostream & lspserver::operator<< ( llvm::raw_ostream & OS,
MarkupKind K )

Definition at line 910 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator==() [1/3]

Definition at line 1394 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ operator==() [2/3]

◆ operator==() [3/3]

◆ parseParam() [1/2]

template<typename T >
llvm::Expected< T > lspserver::parseParam ( const llvm::json::Value & Raw,
llvm::StringRef PayloadName,
llvm::StringRef PayloadKind )

Definition at line 13 of file LSPBinder.h.

References elog(), fromJSON(), InvalidParams, and vlog().

◆ parseParam() [2/2]

template<>
llvm::Expected< llvm::json::Value > lspserver::parseParam ( const llvm::json::Value & Raw,
llvm::StringRef PayloadName,
llvm::StringRef PayloadKind )
inline

Definition at line 37 of file LSPBinder.h.

◆ pathEqual()

bool lspserver::pathEqual ( PathRef ,
PathRef  )

◆ pathStartsWith()

bool lspserver::pathStartsWith ( PathRef Ancestor,
PathRef Path,
llvm::sys::path::Style Style = llvm::sys::path::Style::native )

Checks if Ancestor is a proper ancestor of Path. This is just a smarter lexical prefix match, e.g: foo/bar/baz doesn't start with foo/./bar. Both Ancestor and Path must be absolute.

◆ positionToOffset()

llvm::Expected< size_t > lspserver::positionToOffset ( llvm::StringRef Code,
Position P,
bool AllowColumnsBeyondLineLength = true )

Turn a [line, column] pair into an offset in Code.

If P.character exceeds the line length, returns the offset at end-of-line. (If !AllowColumnsBeyondLineLength, then returns an error instead). If the line number is out of range, returns an error.

The returned value is in the range [0, Code.size()].

Definition at line 115 of file SourceCode.cpp.

References lspserver::Position::character, error(), fromJSON(), and lspserver::Position::line.

Referenced by applyChange().

◆ readLine()

bool lspserver::readLine ( int fd,
const std::atomic< bool > & Close,
llvm::SmallString< 128 > & Line )

◆ toJSON() [1/58]

llvm::json::Value lspserver::toJSON ( const ApplyWorkspaceEditParams & Params)

Definition at line 836 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [2/58]

llvm::json::Value lspserver::toJSON ( const ASTNode & N)

Definition at line 1506 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [3/58]

llvm::json::Value lspserver::toJSON ( const CallHierarchyIncomingCall & C)

Definition at line 1352 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [4/58]

llvm::json::Value lspserver::toJSON ( const CallHierarchyItem & I)

Definition at line 1318 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [5/58]

llvm::json::Value lspserver::toJSON ( const CallHierarchyOutgoingCall & C)

Definition at line 1362 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [6/58]

llvm::json::Value lspserver::toJSON ( const ChangeAnnotation & CA)

Definition at line 214 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [7/58]

llvm::json::Value lspserver::toJSON ( const CodeAction & CA)

◆ toJSON() [8/58]

llvm::json::Value lspserver::toJSON ( const CodeDescription & D)

Definition at line 610 of file lspserver/src/Protocol.cpp.

References lspserver::CodeDescription::href.

◆ toJSON() [9/58]

llvm::json::Value lspserver::toJSON ( const Command & C)

Definition at line 759 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [10/58]

llvm::json::Value lspserver::toJSON ( const CompletionItem & CI)

Definition at line 989 of file lspserver/src/Protocol.cpp.

References fromJSON(), and Missing.

◆ toJSON() [11/58]

llvm::json::Value lspserver::toJSON ( const CompletionList & L)

Definition at line 1051 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [12/58]

llvm::json::Value lspserver::toJSON ( const ConfigurationItem & N)

Definition at line 1536 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [13/58]

llvm::json::Value lspserver::toJSON ( const ConfigurationParams & N)

Definition at line 1545 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [14/58]

llvm::json::Value lspserver::toJSON ( const Diagnostic & D)

◆ toJSON() [15/58]

llvm::json::Value lspserver::toJSON ( const DiagnosticRelatedInformation & DRI)

Definition at line 601 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [16/58]

llvm::json::Value lspserver::toJSON ( const DocumentHighlight & DH)

Definition at line 1108 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ toJSON() [17/58]

llvm::json::Value lspserver::toJSON ( const DocumentLink & DocumentLink)

◆ toJSON() [18/58]

llvm::json::Value lspserver::toJSON ( const DocumentSymbol & S)

Definition at line 789 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [19/58]

llvm::json::Value lspserver::toJSON ( const FileStatus & FStatus)

Definition at line 1115 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [20/58]

llvm::json::Value lspserver::toJSON ( const FoldingRange & Range)

Definition at line 1486 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [21/58]

llvm::json::Value lspserver::toJSON ( const Hover & H)

Definition at line 933 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ toJSON() [22/58]

llvm::json::Value lspserver::toJSON ( const InactiveRegionsParams & InactiveRegions)

◆ toJSON() [23/58]

llvm::json::Value lspserver::toJSON ( const InlayHint & H)

Definition at line 1384 of file lspserver/src/Protocol.cpp.

References fromJSON(), and toJSON().

◆ toJSON() [24/58]

llvm::json::Value lspserver::toJSON ( const InlayHintKind & Kind)

Definition at line 1372 of file lspserver/src/Protocol.cpp.

References Designator, fromJSON(), Parameter, and Type.

◆ toJSON() [25/58]

llvm::json::Value lspserver::toJSON ( const Location & P)

◆ toJSON() [26/58]

llvm::json::Value lspserver::toJSON ( const MarkupContent & MC)

Definition at line 914 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [27/58]

llvm::json::Value lspserver::toJSON ( const MessageType & R)

Definition at line 510 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [28/58]

llvm::json::Value lspserver::toJSON ( const NoParams & )
inline

Definition at line 299 of file lspserver/include/lspserver/Protocol.h.

◆ toJSON() [29/58]

llvm::json::Value lspserver::toJSON ( const OffsetEncoding & OE)

Definition at line 1431 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [30/58]

llvm::json::Value lspserver::toJSON ( const ParameterInformation & PI)

Definition at line 1058 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [31/58]

llvm::json::Value lspserver::toJSON ( const Position & P)

◆ toJSON() [32/58]

template<typename T >
llvm::json::Value lspserver::toJSON ( const ProgressParams< T > & P)

◆ toJSON() [33/58]

llvm::json::Value lspserver::toJSON ( const PublishDiagnosticsParams & PDP)

Definition at line 654 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [34/58]

llvm::json::Value lspserver::toJSON ( const Range & P)

Definition at line 139 of file lspserver/src/Protocol.cpp.

References lspserver::Range::end, and lspserver::Range::start.

◆ toJSON() [35/58]

llvm::json::Value lspserver::toJSON ( const ReferenceLocation & P)

◆ toJSON() [36/58]

llvm::json::Value lspserver::toJSON ( const SelectionRange & Out)

◆ toJSON() [37/58]

llvm::json::Value lspserver::toJSON ( const SemanticTokens & Tokens)

Definition at line 1144 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [38/58]

llvm::json::Value lspserver::toJSON ( const SemanticTokensEdit & Edit)

Definition at line 1149 of file lspserver/src/Protocol.cpp.

References fromJSON(), and SemanticTokenEncodingSize.

◆ toJSON() [39/58]

llvm::json::Value lspserver::toJSON ( const SemanticTokensOrDelta & TE)

Definition at line 1156 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [40/58]

llvm::json::Value lspserver::toJSON ( const ShowMessageParams & R)

◆ toJSON() [41/58]

llvm::json::Value lspserver::toJSON ( const SignatureHelp & SH)

Definition at line 1089 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [42/58]

llvm::json::Value lspserver::toJSON ( const SignatureInformation & SI)

Definition at line 1072 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [43/58]

llvm::json::Value lspserver::toJSON ( const SymbolInformation & P)

◆ toJSON() [44/58]

llvm::json::Value lspserver::toJSON ( const TextDocumentEdit & P)

◆ toJSON() [45/58]

llvm::json::Value lspserver::toJSON ( const TextDocumentIdentifier & R)

Definition at line 94 of file lspserver/src/Protocol.cpp.

References lspserver::TextDocumentIdentifier::uri.

◆ toJSON() [46/58]

llvm::json::Value lspserver::toJSON ( const TextEdit & P)

◆ toJSON() [47/58]

llvm::json::Value lspserver::toJSON ( const TweakArgs & A)

Definition at line 831 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [48/58]

llvm::json::Value lspserver::toJSON ( const TypeHierarchyItem & I)

Definition at line 1266 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [49/58]

llvm::json::Value lspserver::toJSON ( const TypeHierarchyItem::ResolveParams & RP)

Definition at line 1254 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [50/58]

llvm::json::Value lspserver::toJSON ( const URIForFile & U)

Serialize/deserialize URIForFile to/from a string URI.

Definition at line 88 of file lspserver/src/Protocol.cpp.

References fromJSON().

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

◆ toJSON() [51/58]

llvm::json::Value lspserver::toJSON ( const VersionedTextDocumentIdentifier & R)

◆ toJSON() [52/58]

llvm::json::Value lspserver::toJSON ( const WorkDoneProgressBegin & P)

◆ toJSON() [53/58]

llvm::json::Value lspserver::toJSON ( const WorkDoneProgressCreateParams & P)

◆ toJSON() [54/58]

llvm::json::Value lspserver::toJSON ( const WorkDoneProgressEnd & P)

◆ toJSON() [55/58]

llvm::json::Value lspserver::toJSON ( const WorkDoneProgressReport & P)

◆ toJSON() [56/58]

llvm::json::Value lspserver::toJSON ( const WorkspaceEdit & WE)

Definition at line 805 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [57/58]

llvm::json::Value lspserver::toJSON ( DiagnosticTag Tag)

Definition at line 608 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ toJSON() [58/58]

llvm::json::Value lspserver::toJSON ( SymbolTag Tag)

Definition at line 1314 of file lspserver/src/Protocol.cpp.

References fromJSON().

◆ unionRanges()

void lspserver::unionRanges ( Range & A,
Range B )

◆ vlog()

template<typename... Ts>
void lspserver::vlog ( const char * Fmt,
Ts &&... Vals )

Variable Documentation

◆ CompletionItemKindMax

constexpr auto lspserver::CompletionItemKindMax
constexpr
Initial value:
=
static_cast<size_t>(CompletionItemKind::TypeParameter)

Definition at line 352 of file lspserver/include/lspserver/Protocol.h.

◆ CompletionItemKindMin

constexpr auto lspserver::CompletionItemKindMin
constexpr
Initial value:
=
static_cast<size_t>(CompletionItemKind::Text)

Definition at line 350 of file lspserver/include/lspserver/Protocol.h.

Referenced by adjustKindToCapability().

◆ kCurrentOffsetEncoding

Key<OffsetEncoding> lspserver::kCurrentOffsetEncoding
extern

◆ SemanticTokenEncodingSize

constexpr unsigned lspserver::SemanticTokenEncodingSize = 5
constexpr

Definition at line 1122 of file lspserver/src/Protocol.cpp.

Referenced by toJSON().

◆ SymbolKindMax

constexpr auto lspserver::SymbolKindMax = static_cast<size_t>(SymbolKind::TypeParameter)
constexpr

Definition at line 392 of file lspserver/include/lspserver/Protocol.h.

◆ SymbolKindMin

constexpr auto lspserver::SymbolKindMin = static_cast<size_t>(SymbolKind::File)
constexpr

Definition at line 391 of file lspserver/include/lspserver/Protocol.h.

Referenced by adjustKindToCapability().