MLIR  16.0.0git
mlir::lsp::CompletionItem Struct Reference

#include "Tools/lsp-server-support/Protocol.h"

Collaboration diagram for mlir::lsp::CompletionItem:

Public Member Functions

CompletionItem ()=default

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

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

Optional< MarkupContentdocumentation
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...

Optional< TextEdittextEdit
An edit which is applied to a document when selecting this completion. More...

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

bool deprecated = false
Indicates if this item is deprecated. More...

Detailed Description

Definition at line 793 of file Protocol.h.

◆ CompletionItem() [1/2]

 mlir::lsp::CompletionItem::CompletionItem ( )
default

◆ CompletionItem() [2/2]

 mlir::lsp::CompletionItem::CompletionItem ( const Twine & label, CompletionItemKind kind, StringRef sortText = "" )
inline

Definition at line 795 of file Protocol.h.

Member Data Documentation

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 841 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ deprecated

 bool mlir::lsp::CompletionItem::deprecated = false

Indicates if this item is deprecated.

Definition at line 844 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ detail

 std::string mlir::lsp::CompletionItem::detail

Definition at line 810 of file Protocol.h.

Referenced by getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ documentation

 Optional mlir::lsp::CompletionItem::documentation

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

Definition at line 813 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ filterText

 std::string mlir::lsp::CompletionItem::filterText

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

When falsy the label is used.

Definition at line 821 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ insertText

 std::string mlir::lsp::CompletionItem::insertText

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

When falsy the label is used.

Definition at line 825 of file Protocol.h.

Referenced by getLspDiagnoticFromDiag(), and mlir::lsp::toJSON().

◆ insertTextFormat

 InsertTextFormat mlir::lsp::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 829 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ kind

 CompletionItemKind mlir::lsp::CompletionItem::kind = CompletionItemKind::Missing

The kind of this completion item.

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

Definition at line 806 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ label

 std::string mlir::lsp::CompletionItem::label

The label of this completion item.

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

Definition at line 802 of file Protocol.h.

Referenced by mlir::lsp::operator<<(), and mlir::lsp::toJSON().

◆ sortText

 std::string mlir::lsp::CompletionItem::sortText

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

When falsy the label is used.

Definition at line 817 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

◆ textEdit

 Optional mlir::lsp::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 836 of file Protocol.h.

Referenced by mlir::lsp::toJSON().

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