clang-tools  7.0.0
Public Attributes | List of all members
clang::clangd::CompletionItem Struct Reference

#include <Protocol.h>

Collaboration diagram for clang::clangd::CompletionItem:
[legend]

Public Attributes

std::string label
 The label of this completion item. More...
 
CompletionItemKind kind = CompletionItemKind::Missing
 The kind of this completion item. More...
 
std::string detail
 A human-readable string with additional information about this item, like type or symbol information. More...
 
std::string documentation
 A human-readable string that represents a doc-comment. More...
 
std::string sortText
 A string that should be used when comparing this item with other items. More...
 
std::string filterText
 A string that should be used when filtering a set of completion items. More...
 
std::string insertText
 A string that should be inserted to a document when selecting this completion. More...
 
InsertTextFormat insertTextFormat = InsertTextFormat::Missing
 The format of the insert text. More...
 
llvm::Optional< TextEdittextEdit
 An edit which is applied to a document when selecting this completion. More...
 
std::vector< TextEditadditionalTextEdits
 An optional array of additional text edits that are applied when selecting this completion. More...
 

Detailed Description

Definition at line 684 of file Protocol.h.

Member Data Documentation

◆ additionalTextEdits

std::vector<TextEdit> clang::clangd::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 726 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ detail

std::string clang::clangd::CompletionItem::detail

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

Definition at line 695 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ documentation

std::string clang::clangd::CompletionItem::documentation

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

Definition at line 698 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ filterText

std::string clang::clangd::CompletionItem::filterText

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

When falsy the label is used.

Definition at line 706 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ insertText

std::string clang::clangd::CompletionItem::insertText

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

When falsy the label is used.

Definition at line 710 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ insertTextFormat

InsertTextFormat clang::clangd::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 714 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ kind

CompletionItemKind clang::clangd::CompletionItem::kind = CompletionItemKind::Missing

The kind of this completion item.

Based of the kind an icon is chosen by the editor.

Definition at line 691 of file Protocol.h.

Referenced by clang::clangd::toJSON().

◆ label

std::string clang::clangd::CompletionItem::label

The label of this completion item.

By default also the text that is inserted when selecting this completion.

Definition at line 687 of file Protocol.h.

Referenced by clang::clangd::operator<(), clang::clangd::operator<<(), and clang::clangd::toJSON().

◆ sortText

std::string clang::clangd::CompletionItem::sortText

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

When falsy the label is used.

Definition at line 702 of file Protocol.h.

Referenced by clang::clangd::operator<(), and clang::clangd::toJSON().

◆ textEdit

llvm::Optional<TextEdit> clang::clangd::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 721 of file Protocol.h.

Referenced by clang::clangd::toJSON().


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