nixd
Loading...
Searching...
No Matches
Public Attributes | List of all members
lspserver::CompletionItem Struct Reference

#include <Protocol.h>

Public Attributes

std::string label
 
CompletionItemKind kind = CompletionItemKind::Missing
 
std::string detail
 
std::optional< MarkupContentdocumentation
 A human-readable string that represents a doc-comment.
 
std::string sortText
 
std::string filterText
 
std::string insertText
 
InsertTextFormat insertTextFormat = InsertTextFormat::Missing
 
std::optional< TextEdittextEdit
 
std::vector< TextEditadditionalTextEdits
 
bool deprecated = false
 Indicates if this item is deprecated.
 
float score = 0.f
 
std::string data
 

Detailed Description

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

Member Data Documentation

◆ additionalTextEdits

std::vector<TextEdit> lspserver::CompletionItem::additionalTextEdits

An optional array of additional text edits that are applied when selecting this completion. Edits must not overlap with the main edit nor with themselves.

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

Referenced by lspserver::fromJSON().

◆ data

std::string lspserver::CompletionItem::data

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

Referenced by lspserver::fromJSON().

◆ deprecated

bool lspserver::CompletionItem::deprecated = false

Indicates if this item is deprecated.

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

◆ detail

std::string lspserver::CompletionItem::detail

A human-readable string with additional information about this item, like type or symbol information.

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

Referenced by lspserver::fromJSON().

◆ documentation

std::optional<MarkupContent> lspserver::CompletionItem::documentation

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

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

Referenced by lspserver::fromJSON().

◆ filterText

std::string lspserver::CompletionItem::filterText

A string that should be used when filtering a set of completion items. When falsy the label is used.

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

Referenced by lspserver::fromJSON().

◆ insertText

std::string lspserver::CompletionItem::insertText

A string that should be inserted to a document when selecting this completion. When falsy the label is used.

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

Referenced by lspserver::fromJSON().

◆ insertTextFormat

InsertTextFormat lspserver::CompletionItem::insertTextFormat = InsertTextFormat::Missing

The format of the insert text. The format applies to both the insertText property and the newText property of a provided textEdit.

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

Referenced by lspserver::fromJSON().

◆ kind

CompletionItemKind lspserver::CompletionItem::kind = CompletionItemKind::Missing

The kind of this completion item. Based of the kind an icon is chosen by the editor.

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

Referenced by lspserver::fromJSON().

◆ label

std::string lspserver::CompletionItem::label

The label of this completion item. By default also the text that is inserted when selecting this completion.

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

Referenced by lspserver::fromJSON(), and lspserver::operator<().

◆ score

float lspserver::CompletionItem::score = 0.f

The score that clangd calculates to rank the returned completions. This excludes the fuzzy-match between filterText and the partial word. This can be used to re-rank results as the user types, using client-side fuzzy-matching (that score should be multiplied with this one). This is a clangd extension.

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

◆ sortText

std::string lspserver::CompletionItem::sortText

A string that should be used when comparing this item with other items. When falsy the label is used.

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

Referenced by lspserver::fromJSON(), and lspserver::operator<().

◆ textEdit

std::optional<TextEdit> lspserver::CompletionItem::textEdit

An edit which is applied to a document when selecting this completion. When an edit is provided insertText is ignored.

Note: The range of the edit must be a single line range and it must contain the position at which completion has been requested.

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

Referenced by lspserver::fromJSON().


The documentation for this struct was generated from the following file: