LLVM: include/llvm/Support/LSP/Protocol.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23#ifndef LLVM_SUPPORT_LSP_PROTOCOL_H

24#define LLVM_SUPPORT_LSP_PROTOCOL_H

25

31#include

32#include

33#include

34#include

35

36

37

38

39

40

41namespace llvm {

42namespace lsp {

43

60

61

62

74

75

76

77

78

79

96

97

98

99

100

101

103public:

105

106

108

109

110

113

114

116

117

119

120

122

123 explicit operator bool() const { return !filePath.empty(); }

124

126 return lhs.filePath == rhs.filePath;

127 }

129 return !(lhs == rhs);

130 }

132 return lhs.filePath < rhs.filePath;

133 }

134

135

136

137

139

140private:

141 explicit URIForFile(std::string &&filePath, std::string &&uriStr)

142 : filePath(std::move(filePath)), uriStr(uriStr) {}

143

144 std::string filePath;

145 std::string uriStr;

146};

147

148

152raw_ostream &operator<<(raw_ostream &os, const URIForFile &value);

153

154

155

156

157

159

160

162

163

164

166

167

168

169

170

172};

173

174

178

179

180

181

182

190

191

194

195

196

197

198

204

205

208

210

212

213

215

216

217 std::optional trace;

218};

219

220

224

225

226

227

228

234

235

236

237

238

240

242

243

245

246

248

249

251};

252

253

257

258

259

260

261

266

267

272

273

274

275

276

283

284

290

291

292

293

294

298

299

301 std::pair<unsigned, unsigned> lineAndCol = mgr.getLineAndColumn(loc);

302 line = lineAndCol.first - 1;

303 character = lineAndCol.second - 1;

304 }

305

306

308

309

311

317 return !(lhs == rhs);

318 }

327

328

329

334};

335

336

341

342

343

344

345

350

351

354

355

357

358

360

365 return !(lhs == rhs);

366 }

370

375

376

377

379 SMLoc startLoc = start.getAsSMLoc(mgr);

380 SMLoc endLoc = end.getAsSMLoc(mgr);

381

385 return SMRange(startLoc, endLoc);

386 }

387};

388

389

394

395

396

397

398

402

403

406

407

410

414

416 return !(lhs == rhs);

417 }

418

422};

423

424

429

430

431

432

433

441

442

446

447

448

449

450

455

456

460

464

465

468

469

470

471

472

477

478

482

483

484

485

486

491

492

496

497

498

499

500

502

504

506 std::string &contents);

507

508

510

511

513

514

516};

517

518

522

530

531

535

536

537

538

539

540

541

547

552

553

555

556

557

558

559

561

563

564

566

567

568

570};

571

572

574

575

576

577

578

607

608

609

610

611

612

613

614

615

623

624

626

627

629

630

632

633

634

635

636

638

639

640

642

643

645};

646

647

649

650

651

652

653

658

659

663

664

665

666

667

668

669

670

681

682

688

689

690

691

692

702

707

708

712

714

716

717

718

720

721

722

724

725

727

728

729

731

732

733 std::vector tags;

734

735

736

737

738

740};

741

742

746

747

748

749

750

762

763

766

767

768

769

770

772

773

775

776

777

779};

780

784

789

790

791

792

793

794

824 CompletionItemKind &result,

826

835

839

840

841

842

843

844

845

848

850

851

852

853

854

855

856

857

858

860};

861

868

869

870

872

873

874

876

877

878

880

881

883

884

885

887

888

889

891

892

893

895

896

897

899

900

901

902

903

904

906

907

908

909

911

912

914};

915

916

920

921

922

923

924

925

927

928

930

931

932 std::vector items;

933};

934

935

937

938

939

940

941

943

944

946

947

948

950

951

953};

954

963

964

968

969

970

971

972

976

977

981

982

983

984

985

986

988

990

991

992

993 std::optional<std::pair<unsigned, unsigned>> labelOffsets;

994

995

997};

998

999

1001

1002

1003

1004

1005

1006

1008

1010

1011

1013

1014

1016};

1017

1018

1021

1022

1023

1024

1025

1026

1028

1030

1031

1033

1034

1036};

1037

1038

1040

1041

1042

1043

1044

1045

1050

1051

1055

1056

1057

1058

1059

1060

1061

1066

1067

1069

1070

1072

1073

1074

1075

1076

1077

1078

1079

1083

1085 return !(lhs == rhs);

1086 }

1087};

1088

1089

1091

1092

1093

1094

1095

1096

1104

1105

1109

1110

1111

1112

1113

1114

1116

1117

1118

1119

1120

1122

1123

1124

1125

1126

1127

1129};

1130

1131

1132

1133

1134

1135

1138

1139

1141

1142

1143

1144

1145

1147

1148

1149

1151

1152

1153

1154

1155

1156

1158

1159

1160

1161

1162

1163

1165};

1166

1167

1172

1173

1174

1175

1176

1178

1179

1180

1181

1182

1183

1185

1186

1187

1188

1189

1190 std::vectorstd::string only;

1191};

1192

1193

1197

1198

1199

1200

1201

1203

1205

1206

1208

1209

1211};

1212

1213

1217

1218

1219

1220

1221

1223

1224 std::map<std::string, std::vector> changes;

1225

1226

1227

1228};

1229

1230

1234

1235

1236

1237

1238

1239

1240

1241

1242

1243

1245

1247

1248

1249

1250 std::optionalstd::string kind;

1254

1255

1257

1258

1259

1260

1261

1262

1264

1265

1266 std::optional edit;

1267};

1268

1269

1271

1272

1273

1274

1275

1277

1282

1287

1289

1290 std::optional<std::vector> actions;

1291};

1292

1293

1295

1296

1298

1299}

1300}

1301

1302namespace llvm {

1306 assert(style.empty() && "style modifiers for this type are not supported");

1307 os << pos;

1308 }

1309};

1310}

1311

1312#endif

1313

1314

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

#define LLVM_ABI_FOR_TEST

This file supports working with JSON data.

ConstantRange Range(APInt(BitWidth, Low), APInt(BitWidth, High))

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Base class for user error types.

Tagged union holding either a T or a Error.

Represents a location in source code.

constexpr const char * getPointer() const

constexpr bool isValid() const

Represents a range in source code.

This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.

unsigned getMainFileID() const

LLVM_ABI std::pair< unsigned, unsigned > getLineAndColumn(SMLoc Loc, unsigned BufferID=0) const

Find the line and column number for the specified location in the specified file.

LLVM_ABI SMLoc FindLocForLineAndColumn(unsigned BufferID, unsigned LineNo, unsigned ColNo)

Given a line and column number in a mapped buffer, turn it into an SMLoc.

A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...

StringRef - Represent a constant reference to a string, i.e.

constexpr bool empty() const

empty - Check if the string is empty.

Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...

A "cursor" marking a position within a Value.

A Value is an JSON value of unknown type.

static LLVM_ABI_FOR_TEST char ID

Definition Protocol.h:84

void log(raw_ostream &os) const override

Print an error message to an output stream.

Definition Protocol.h:89

std::error_code convertToErrorCode() const override

Convert this error to a std::error_code.

Definition Protocol.h:92

std::string message

Definition Protocol.h:82

ErrorCode code

Definition Protocol.h:83

LSPError(std::string message, ErrorCode code)

Definition Protocol.h:86

URI in "file" scheme for a file.

Definition Protocol.h:102

friend bool operator==(const URIForFile &lhs, const URIForFile &rhs)

Definition Protocol.h:125

static void registerSupportedScheme(StringRef scheme)

Register a supported URI scheme.

static llvm::Expected< URIForFile > fromFile(StringRef absoluteFilepath, StringRef scheme="file")

Try to build a URIForFile from the given absolute file path and optional scheme.

static llvm::Expected< URIForFile > fromURI(StringRef uri)

Try to build a URIForFile from the given URI string.

StringRef scheme() const

Return the scheme of the uri.

friend bool operator!=(const URIForFile &lhs, const URIForFile &rhs)

Definition Protocol.h:128

StringRef uri() const

Returns the original uri of the file.

Definition Protocol.h:118

friend bool operator<(const URIForFile &lhs, const URIForFile &rhs)

Definition Protocol.h:131

StringRef file() const

Returns the absolute path to the file.

Definition Protocol.h:115

This class implements an extremely fast bulk output stream that can only output to a stream.

constexpr auto kCompletionItemKindMin

Definition Protocol.h:827

MarkupKind

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

Definition Protocol.h:542

@ Markdown

Definition Protocol.h:544

@ PlainText

Definition Protocol.h:543

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

Add support for JSON serialization.

CompletionTriggerKind

Definition Protocol.h:942

@ Invoked

Completion was triggered by typing an identifier (24x7 code complete), manual invocation (e....

Definition Protocol.h:945

@ TriggerTriggerForIncompleteCompletions

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

Definition Protocol.h:952

@ TriggerCharacter

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

Definition Protocol.h:949

TextDocumentSyncKind

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

Definition Protocol.h:63

@ Incremental

Documents are synced by sending the full content on open.

Definition Protocol.h:72

@ None

Documents should not be synced at all.

Definition Protocol.h:65

@ Full

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

Definition Protocol.h:68

bool operator<(const CompletionItem &lhs, const CompletionItem &rhs)

bool operator==(const TextEdit &lhs, const TextEdit &rhs)

Definition Protocol.h:781

NoParams InitializedParams

Definition Protocol.h:233

raw_ostream & operator<<(raw_ostream &os, const URIForFile &value)

CompletionItemKind adjustKindToCapability(CompletionItemKind kind, CompletionItemKindBitset &supportedCompletionItemKinds)

InlayHintKind

Inlay hint kinds.

Definition Protocol.h:1115

@ Parameter

An inlay hint that is for a parameter.

Definition Protocol.h:1128

@ Type

An inlay hint that for a type annotation.

Definition Protocol.h:1121

SymbolKind

Definition Protocol.h:579

@ File

Definition Protocol.h:580

@ Package

Definition Protocol.h:583

@ String

Definition Protocol.h:594

@ Boolean

Definition Protocol.h:596

@ Interface

Definition Protocol.h:590

@ Array

Definition Protocol.h:597

@ Variable

Definition Protocol.h:592

@ Object

Definition Protocol.h:598

@ Method

Definition Protocol.h:585

@ Property

Definition Protocol.h:586

@ Constructor

Definition Protocol.h:588

@ EnumMember

Definition Protocol.h:601

@ Field

Definition Protocol.h:587

@ Function

Definition Protocol.h:591

@ Struct

Definition Protocol.h:602

@ Key

Definition Protocol.h:599

@ Class

Definition Protocol.h:584

@ Event

Definition Protocol.h:603

@ Number

Definition Protocol.h:595

@ Namespace

Definition Protocol.h:582

@ TypeParameter

Definition Protocol.h:605

@ Null

Definition Protocol.h:600

@ Constant

Definition Protocol.h:593

@ Enum

Definition Protocol.h:589

@ Operator

Definition Protocol.h:604

@ Module

Definition Protocol.h:581

DiagnosticSeverity

Definition Protocol.h:693

@ Warning

Definition Protocol.h:698

@ Error

Definition Protocol.h:697

@ Information

Definition Protocol.h:699

@ Hint

Definition Protocol.h:700

@ Undetermined

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

Definition Protocol.h:696

InsertTextFormat

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

Definition Protocol.h:846

@ Missing

Definition Protocol.h:847

std::bitset< kCompletionItemKindMax+1 > CompletionItemKindBitset

Definition Protocol.h:831

constexpr auto kCompletionItemKindMax

Definition Protocol.h:829

DiagnosticTag

Definition Protocol.h:703

@ Deprecated

Definition Protocol.h:705

@ Unnecessary

Definition Protocol.h:704

TraceLevel

Definition Protocol.h:199

@ Messages

Definition Protocol.h:201

@ Off

Definition Protocol.h:200

@ Verbose

Definition Protocol.h:202

CompletionItemKind

The kind of a completion entry.

Definition Protocol.h:795

@ Unit

Definition Protocol.h:807

@ Keyword

Definition Protocol.h:810

@ Missing

Definition Protocol.h:796

@ Reference

Definition Protocol.h:814

@ Value

Definition Protocol.h:808

@ Text

Definition Protocol.h:797

@ Folder

Definition Protocol.h:815

@ TypeParameter

Definition Protocol.h:821

@ Snippet

Definition Protocol.h:811

@ Color

Definition Protocol.h:812

LLVM_ABI_FOR_TEST bool fromJSON(const llvm::json::Value &value, URIForFile &result, llvm::json::Path path)

MessageType

Definition Protocol.h:1276

@ Info

Definition Protocol.h:1276

@ Debug

Definition Protocol.h:1276

@ Log

Definition Protocol.h:1276

ErrorCode

Definition Protocol.h:44

@ MethodNotFound

Definition Protocol.h:48

@ RequestFailed

Definition Protocol.h:58

@ RequestCancelled

Definition Protocol.h:56

@ ServerNotInitialized

Definition Protocol.h:52

@ UnknownErrorCode

Definition Protocol.h:53

@ InternalError

Definition Protocol.h:50

@ ContentModified

Definition Protocol.h:57

@ InvalidParams

Definition Protocol.h:49

@ InvalidRequest

Definition Protocol.h:47

@ ParseError

Definition Protocol.h:46

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI std::error_code inconvertibleErrorCode()

The value returned by this function can be returned from convertToErrorCode for Error values where no...

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

Implement std::hash so that hash_code can be used in STL containers.

This class represents an efficient way to signal success or failure.

static void format(const llvm::lsp::Position &pos, raw_ostream &os, StringRef style)

Definition Protocol.h:1304

Definition Protocol.h:158

bool hierarchicalDocumentSymbol

Client supports hierarchical document symbols.

Definition Protocol.h:161

bool workDoneProgress

Client supports server-initiated progress via the window/workDoneProgress/create method.

Definition Protocol.h:171

bool codeActionStructure

Client supports CodeAction return value for textDocument/codeAction.

Definition Protocol.h:165

Definition Protocol.h:183

std::string name

The name of the client as defined by the client.

Definition Protocol.h:185

std::optional< std::string > version

The client's version as defined by the client.

Definition Protocol.h:188

Definition Protocol.h:1177

std::vector< Diagnostic > diagnostics

An array of diagnostics known on the client side overlapping the range provided to the textDocument/c...

Definition Protocol.h:1184

std::vector< std::string > only

Requested kind of actions to return.

Definition Protocol.h:1190

Definition Protocol.h:1202

CodeActionContext context

Context carrying additional information.

Definition Protocol.h:1210

TextDocumentIdentifier textDocument

The document in which the command was invoked.

Definition Protocol.h:1204

Range range

The range for which the command was invoked.

Definition Protocol.h:1207

A code action represents a change that can be performed in code, e.g.

Definition Protocol.h:1244

std::optional< std::string > kind

The kind of the code action.

Definition Protocol.h:1250

static const llvm::StringLiteral kRefactor

Definition Protocol.h:1252

static const llvm::StringLiteral kInfo

Definition Protocol.h:1253

bool isPreferred

Marks this as a preferred action.

Definition Protocol.h:1263

static const llvm::StringLiteral kQuickFix

Definition Protocol.h:1251

std::optional< std::vector< Diagnostic > > diagnostics

The diagnostics that this code action resolves.

Definition Protocol.h:1256

std::optional< WorkspaceEdit > edit

The workspace edit this code action performs.

Definition Protocol.h:1266

std::string title

A short, human-readable, title for this code action.

Definition Protocol.h:1246

Definition Protocol.h:955

std::string triggerCharacter

The trigger character (a single character) that has trigger code complete.

Definition Protocol.h:961

CompletionTriggerKind triggerKind

How the completion was triggered.

Definition Protocol.h:957

Definition Protocol.h:862

CompletionItem(const Twine &label, CompletionItemKind kind, StringRef sortText="")

Definition Protocol.h:864

std::string filterText

A string that should be used when filtering a set of completion items.

Definition Protocol.h:890

std::string insertText

A string that should be inserted to a document when selecting this completion.

Definition Protocol.h:894

bool deprecated

Indicates if this item is deprecated.

Definition Protocol.h:913

std::optional< TextEdit > textEdit

An edit which is applied to a document when selecting this completion.

Definition Protocol.h:905

std::vector< TextEdit > additionalTextEdits

An optional array of additional text edits that are applied when selecting this completion.

Definition Protocol.h:910

CompletionItemKind kind

The kind of this completion item.

Definition Protocol.h:875

InsertTextFormat insertTextFormat

The format of the insert text.

Definition Protocol.h:898

std::string label

The label of this completion item.

Definition Protocol.h:871

std::optional< MarkupContent > documentation

A human-readable string that represents a doc-comment.

Definition Protocol.h:882

std::string sortText

A string that should be used when comparing this item with other items.

Definition Protocol.h:886

Represents a collection of completion items to be presented in the editor.

Definition Protocol.h:926

bool isIncomplete

The list is not complete.

Definition Protocol.h:929

std::vector< CompletionItem > items

The completion items.

Definition Protocol.h:932

Definition Protocol.h:973

CompletionContext context

Definition Protocol.h:974

Definition Protocol.h:713

std::vector< DiagnosticTag > tags

Additional metadata about the diagnostic.

Definition Protocol.h:733

std::string message

The diagnostic's message.

Definition Protocol.h:726

Range range

The source range where the message applies.

Definition Protocol.h:715

std::optional< std::vector< DiagnosticRelatedInformation > > relatedInformation

An array of related diagnostic information, e.g.

Definition Protocol.h:730

std::string source

A human-readable string describing the source of this diagnostic, e.g.

Definition Protocol.h:723

DiagnosticSeverity severity

The diagnostic's severity.

Definition Protocol.h:719

std::optional< std::string > category

The diagnostic's category.

Definition Protocol.h:739

Definition Protocol.h:523

VersionedTextDocumentIdentifier textDocument

The document that changed.

Definition Protocol.h:525

std::vector< TextDocumentContentChangeEvent > contentChanges

The actual content changes.

Definition Protocol.h:528

Definition Protocol.h:487

TextDocumentIdentifier textDocument

The document that was closed.

Definition Protocol.h:489

Definition Protocol.h:473

TextDocumentItem textDocument

The document that was opened.

Definition Protocol.h:475

Parameters for the document link request.

Definition Protocol.h:1046

TextDocumentIdentifier textDocument

The document to provide document links for.

Definition Protocol.h:1048

friend bool operator!=(const DocumentLink &lhs, const DocumentLink &rhs)

Definition Protocol.h:1084

URIForFile target

The uri this link points to. If missing a resolve request is sent later.

Definition Protocol.h:1071

DocumentLink(Range range, URIForFile target)

Definition Protocol.h:1064

Range range

The range this link applies to.

Definition Protocol.h:1068

friend bool operator==(const DocumentLink &lhs, const DocumentLink &rhs)

Definition Protocol.h:1080

Definition Protocol.h:654

TextDocumentIdentifier textDocument

Definition Protocol.h:656

Represents programming constructs like variables, classes, interfaces etc.

Definition Protocol.h:616

Range range

The range enclosing this symbol not including leading/trailing whitespace but everything else like co...

Definition Protocol.h:637

SymbolKind kind

The kind of this symbol.

Definition Protocol.h:631

DocumentSymbol(const Twine &name, SymbolKind kind, Range range, Range selectionRange)

Definition Protocol.h:619

std::string name

The name of this symbol.

Definition Protocol.h:625

DocumentSymbol(DocumentSymbol &&)=default

std::vector< DocumentSymbol > children

Children of this symbol, e.g. properties of a class.

Definition Protocol.h:644

Range selectionRange

The range that should be selected and revealed when this symbol is being picked, e....

Definition Protocol.h:641

Definition Protocol.h:560

std::optional< Range > range

An optional range is a range inside a text document that is used to visualize a hover,...

Definition Protocol.h:569

Hover(Range range)

Construct a default hover with the given range that uses Markdown content.

Definition Protocol.h:562

MarkupContent contents

The hover's content.

Definition Protocol.h:565

Definition Protocol.h:209

std::optional< TraceLevel > trace

The initial trace setting. If omitted trace is disabled ('off').

Definition Protocol.h:217

ClientCapabilities capabilities

The capabilities provided by the client (editor or tool).

Definition Protocol.h:211

std::optional< ClientInfo > clientInfo

Information about the client.

Definition Protocol.h:214

Inlay hint information.

Definition Protocol.h:1136

bool paddingRight

Render padding after the hint.

Definition Protocol.h:1164

InlayHint(InlayHintKind kind, Position pos)

Definition Protocol.h:1137

bool paddingLeft

Render padding before the hint.

Definition Protocol.h:1157

InlayHintKind kind

The kind of this hint.

Definition Protocol.h:1150

std::string label

The label of this hint.

Definition Protocol.h:1146

Position position

The position of this hint.

Definition Protocol.h:1140

A parameter literal used in inlay hint requests.

Definition Protocol.h:1097

Range range

The visible document range for which inlay hints should be computed.

Definition Protocol.h:1102

TextDocumentIdentifier textDocument

The text document.

Definition Protocol.h:1099

Definition Protocol.h:399

Range range

Definition Protocol.h:409

Location(const URIForFile &uri, Range range)

Definition Protocol.h:401

friend bool operator<(const Location &lhs, const Location &rhs)

Definition Protocol.h:419

friend bool operator!=(const Location &lhs, const Location &rhs)

Definition Protocol.h:415

URIForFile uri

The text document's URI.

Definition Protocol.h:408

Location(const URIForFile &uri, llvm::SourceMgr &mgr, SMRange range)

Construct a Location from the given source range.

Definition Protocol.h:404

friend bool operator==(const Location &lhs, const Location &rhs)

Definition Protocol.h:411

Definition Protocol.h:548

std::string value

Definition Protocol.h:550

MarkupKind kind

Definition Protocol.h:549

Definition Protocol.h:1278

std::string title

A short title like 'Retry', 'Open Log' etc.

Definition Protocol.h:1280

Definition Protocol.h:229

A single parameter of a particular signature.

Definition Protocol.h:987

std::optional< std::pair< unsigned, unsigned > > labelOffsets

Inclusive start and exclusive end offsets withing the containing signature label.

Definition Protocol.h:993

std::string documentation

The documentation of this parameter. Optional.

Definition Protocol.h:996

std::string labelString

The label of this parameter. Ignored when labelOffsets is set.

Definition Protocol.h:989

Definition Protocol.h:295

Position(llvm::SourceMgr &mgr, SMLoc loc)

Construct a position from the given source location.

Definition Protocol.h:300

int line

Line position in a document (zero-based).

Definition Protocol.h:307

SMLoc getAsSMLoc(llvm::SourceMgr &mgr) const

Convert this position into a source location in the main file of the given source manager.

Definition Protocol.h:330

friend bool operator==(const Position &lhs, const Position &rhs)

Definition Protocol.h:312

Position(int line=0, int character=0)

Definition Protocol.h:296

int character

Character offset on a line in a document (zero-based).

Definition Protocol.h:310

friend bool operator<(const Position &lhs, const Position &rhs)

Definition Protocol.h:319

friend bool operator<=(const Position &lhs, const Position &rhs)

Definition Protocol.h:323

friend bool operator!=(const Position &lhs, const Position &rhs)

Definition Protocol.h:316

Definition Protocol.h:751

URIForFile uri

The URI for which diagnostic information is reported.

Definition Protocol.h:756

PublishDiagnosticsParams(URIForFile uri, int64_t version)

Definition Protocol.h:752

int64_t version

The version number of the document the diagnostics are published for.

Definition Protocol.h:760

std::vector< Diagnostic > diagnostics

The list of reported diagnostics.

Definition Protocol.h:758

Definition Protocol.h:346

bool contains(Position pos) const

Definition Protocol.h:371

friend bool operator!=(const Range &lhs, const Range &rhs)

Definition Protocol.h:364

SMRange getAsSMRange(llvm::SourceMgr &mgr) const

Convert this range into a source range in the main file of the given source manager.

Definition Protocol.h:378

friend bool operator<(const Range &lhs, const Range &rhs)

Definition Protocol.h:367

bool contains(Range range) const

Definition Protocol.h:372

Position end

The range's end position.

Definition Protocol.h:359

Position start

The range's start position.

Definition Protocol.h:356

Range(llvm::SourceMgr &mgr, SMRange range)

Construct a range from the given source range.

Definition Protocol.h:352

Range(Position start, Position end)

Definition Protocol.h:348

friend bool operator==(const Range &lhs, const Range &rhs)

Definition Protocol.h:361

Range(Position loc)

Definition Protocol.h:349

Definition Protocol.h:451

bool includeDeclaration

Include the declaration of the current symbol.

Definition Protocol.h:453

Definition Protocol.h:461

ReferenceContext context

Definition Protocol.h:462

Definition Protocol.h:1283

MessageType type

Definition Protocol.h:1286

ShowMessageParams(MessageType Type, std::string Message)

Definition Protocol.h:1284

std::string message

The actual message.

Definition Protocol.h:1288

std::optional< std::vector< MessageActionItem > > actions

The message action items to present.

Definition Protocol.h:1290

Represents the signature of a callable.

Definition Protocol.h:1027

std::vector< SignatureInformation > signatures

The resulting signatures.

Definition Protocol.h:1029

int activeParameter

The active parameter of the active signature.

Definition Protocol.h:1035

int activeSignature

The active signature.

Definition Protocol.h:1032

Represents the signature of something callable.

Definition Protocol.h:1007

std::vector< ParameterInformation > parameters

The parameters of this signature.

Definition Protocol.h:1015

std::string label

The label of this signature. Mandatory.

Definition Protocol.h:1009

std::string documentation

The documentation of this signature. Optional.

Definition Protocol.h:1012

Definition Protocol.h:501

std::optional< Range > range

The range of the document that changed.

Definition Protocol.h:509

std::optional< int > rangeLength

The length of the range that got replaced.

Definition Protocol.h:512

LogicalResult applyTo(std::string &contents) const

Try to apply this change to the given contents string.

std::string text

The new text of the range/document.

Definition Protocol.h:515

Definition Protocol.h:262

URIForFile uri

The text document's URI.

Definition Protocol.h:264

Definition Protocol.h:239

std::string languageId

The text document's language identifier.

Definition Protocol.h:244

URIForFile uri

The text document's URI.

Definition Protocol.h:241

int64_t version

The version number of this document.

Definition Protocol.h:250

std::string text

The content of the opened text document.

Definition Protocol.h:247

Definition Protocol.h:434

Position position

The position inside the text document.

Definition Protocol.h:439

TextDocumentIdentifier textDocument

The text document.

Definition Protocol.h:436

Definition Protocol.h:771

Range range

The range of the text document to be manipulated.

Definition Protocol.h:774

std::string newText

The string to be inserted.

Definition Protocol.h:778

Definition Protocol.h:277

URIForFile uri

The text document's URI.

Definition Protocol.h:279

int64_t version

The version number of this document.

Definition Protocol.h:281

Definition Protocol.h:1222

std::map< std::string, std::vector< TextEdit > > changes

Holds changes to existing resources.

Definition Protocol.h:1224