nixd
Loading...
Searching...
No Matches
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< T > parseParam (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_t > positionToOffset (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

◆ InitializedParams

◆ 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

using lspserver::SymbolKindBitset = std::bitset<SymbolKindMax + 1>

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

◆ URISchemeRegistry

typedef llvm::Registry<URIScheme> lspserver::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

enum class lspserver::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 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

enum class lspserver::ErrorCode
strong
Enumerator
ParseError 
InvalidRequest 
MethodNotFound 
InvalidParams 
InternalError 
ServerNotInitialized 
UnknownErrorCode 
RequestCancelled 
ContentModified 

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

◆ FileChangeType

enum class lspserver::FileChangeType
strong
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

enum class lspserver::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.

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

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

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

◆ JSONStreamStyle

enum class lspserver::JSONStreamStyle
strong
Enumerator
Standard 
Delimited 

Definition at line 13 of file Connection.h.

◆ MarkupKind

enum class lspserver::MarkupKind
strong
Enumerator
PlainText 
Markdown 

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

◆ MessageType

enum class lspserver::MessageType
strong
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

enum class lspserver::OffsetEncoding
strong
Enumerator
UnsupportedEncoding 
UTF16 
UTF8 
UTF32 

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

◆ SymbolKind

enum class lspserver::SymbolKind
strong

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

enum class lspserver::SymbolTag
strong
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

enum class lspserver::TraceLevel
strong
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 )

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

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

◆ adjustKindToCapability() [2/2]

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

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

References Class, Enum, EnumMember, String, Struct, and SymbolKindMin.

◆ applyChange()

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

◆ 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()

◆ 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(), and lspserver::detail::wrap().

◆ error() [2/4]

◆ 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().

◆ error() [4/4]

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

Definition at line 86 of file Logger.h.

References lspserver::detail::error().

◆ 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 )

◆ fromJSON() [4/68]

◆ fromJSON() [5/68]

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

◆ 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 )

◆ fromJSON() [8/68]

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

Definition at line 301 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]

◆ fromJSON() [13/68]

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

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

References Text, and TypeParameter.

◆ fromJSON() [14/68]

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

Definition at line 977 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 )

◆ fromJSON() [17/68]

◆ fromJSON() [18/68]

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

◆ fromJSON() [19/68]

◆ 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]

◆ fromJSON() [33/68]

◆ 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 894 of file lspserver/src/Protocol.cpp.

References 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 1433 of file lspserver/src/Protocol.cpp.

References 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 )

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

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

◆ fromJSON() [42/68]

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

Definition at line 1308 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 )

◆ 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 259 of file lspserver/src/Protocol.cpp.

References File, and TypeParameter.

◆ fromJSON() [48/68]

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

Definition at line 270 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 )

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

References lspserver::TextDocumentIdentifier::uri.

◆ 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 )

◆ fromJSON() [56/68]

◆ fromJSON() [57/68]

◆ fromJSON() [58/68]

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

◆ 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 546 of file lspserver/src/Protocol.cpp.

References Created, and Deleted.

◆ fromJSON() [63/68]

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

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

References Messages, Off, and Verbose.

◆ fromJSON() [64/68]

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

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

References Both, and Children.

◆ 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 )

◆ fromJSON() [68/68]

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

◆ log()

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

◆ lspLength()

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

Definition at line 51 of file SourceCode.cpp.

References 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 145 of file SourceCode.cpp.

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

Referenced by nixd::toLSPPosition().

◆ operator<() [1/2]

bool lspserver::operator< ( const CompletionItem & L,
const CompletionItem & R )

◆ operator<() [2/2]

bool lspserver::operator< ( const InlayHint & A,
const InlayHint & B )

◆ operator<<() [1/17]

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

◆ operator<<() [2/17]

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

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

References lspserver::CompletionItem::label, 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 )

◆ operator<<() [5/17]

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

◆ 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 )

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

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

◆ operator<<() [8/17]

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

◆ operator<<() [9/17]

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

◆ operator<<() [10/17]

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

◆ operator<<() [11/17]

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

◆ operator<<() [12/17]

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

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

References lspserver::TypeHierarchyItem::name, and toJSON().

◆ operator<<() [13/17]

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

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

References Designator, Parameter, and Type.

◆ operator<<() [14/17]

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

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

◆ operator<<() [15/17]

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

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

References lspserver::DocumentSymbol::name, and toJSON().

◆ operator<<() [16/17]

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

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

References lspserver::URIForFile::uri().

◆ operator<<() [17/17]

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

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

◆ operator==() [1/3]

bool lspserver::operator== ( const InlayHint & A,
const InlayHint & B )

◆ operator==() [2/3]

◆ operator==() [3/3]

bool lspserver::operator== ( const TextEdit & L,
const TextEdit & R )
inline

◆ parseParam() [1/2]

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

◆ 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 116 of file SourceCode.cpp.

References lspserver::Position::character, error(), 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)

◆ toJSON() [2/58]

◆ toJSON() [3/58]

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

◆ toJSON() [4/58]

◆ toJSON() [5/58]

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

◆ toJSON() [6/58]

◆ toJSON() [7/58]

◆ toJSON() [8/58]

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

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

References lspserver::CodeDescription::href.

◆ toJSON() [9/58]

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

◆ toJSON() [10/58]

◆ toJSON() [11/58]

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

◆ toJSON() [12/58]

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

◆ toJSON() [13/58]

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

◆ toJSON() [14/58]

◆ toJSON() [15/58]

◆ toJSON() [16/58]

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

◆ toJSON() [17/58]

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

◆ toJSON() [18/58]

◆ toJSON() [19/58]

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

◆ toJSON() [20/58]

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

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

◆ toJSON() [21/58]

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

◆ toJSON() [22/58]

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

◆ toJSON() [23/58]

◆ toJSON() [24/58]

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

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

References Designator, 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)

◆ toJSON() [27/58]

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

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

◆ 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 1432 of file lspserver/src/Protocol.cpp.

◆ toJSON() [30/58]

◆ 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]

◆ toJSON() [34/58]

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

Definition at line 140 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)

◆ toJSON() [38/58]

◆ toJSON() [39/58]

◆ toJSON() [40/58]

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

◆ toJSON() [41/58]

◆ toJSON() [42/58]

◆ toJSON() [43/58]

◆ 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 95 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)

◆ toJSON() [48/58]

◆ toJSON() [49/58]

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

◆ toJSON() [50/58]

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

Serialize/deserialize URIForFile to/from a string URI.

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

References lspserver::URIForFile::uri().

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]

◆ 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]

◆ toJSON() [56/58]

◆ toJSON() [57/58]

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

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

◆ toJSON() [58/58]

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

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

◆ unionRanges()

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

◆ vlog()

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

Variable Documentation

◆ CompletionItemKindMax

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

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

◆ CompletionItemKindMin

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

unsigned lspserver::SemanticTokenEncodingSize = 5
constexpr

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

Referenced by toJSON().

◆ SymbolKindMax

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

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

◆ SymbolKindMin

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

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

Referenced by adjustKindToCapability().