An autocomplete item that is being returned Currently simply a string. It is placed in a separate class for future extensions (LSP: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_completion)
More...
#include <textautocompleteprovider.h>
An autocomplete item that is being returned Currently simply a string. It is placed in a separate class for future extensions (LSP: https://github.com/Microsoft/language-server-protocol/blob/master/protocol.md#textDocument_completion)
◆ TextAutoCompleteItem()
edbee::TextAutoCompleteItem::TextAutoCompleteItem |
( |
const QString & | label, |
|
|
const int | kind = 0, |
|
|
const QString & | detail = "", |
|
|
const QString & | documentation = "" ) |
- Parameters
-
kind | the kind of autocomplete items (Use a Langserver constant) |
◆ detail()
QString edbee::TextAutoCompleteItem::detail |
( |
| ) |
const |
◆ documentation()
QString edbee::TextAutoCompleteItem::documentation |
( |
| ) |
const |
◆ kind()
int edbee::TextAutoCompleteItem::kind |
( |
| ) |
const |
◆ label()
QString edbee::TextAutoCompleteItem::label |
( |
| ) |
const |
returns the autocmomplete label
◆ matchLabelScore()
int edbee::TextAutoCompleteItem::matchLabelScore |
( |
TextDocument * | document, |
|
|
const TextRange & | range, |
|
|
const QString & | word ) |
Compares the given text-autocomplete item with the label This method should return a match score, where a score of 0 means NO match.
Returns a copy of the str string. The given string is converted to Unicode using the fromUtf8() function.
- See also
- fromLatin1(), fromLocal8Bit(), fromUtf8(), QByteArray::fromStdString()
For now a simple prefix-prefix search. Later fuzzy search. Inspiration:
◆ detail_
QString edbee::TextAutoCompleteItem::detail_ |
|
protected |
◆ documentation_
QString edbee::TextAutoCompleteItem::documentation_ |
|
protected |
◆ kind_
int edbee::TextAutoCompleteItem::kind_ |
|
protected |
◆ label_
QString edbee::TextAutoCompleteItem::label_ |
|
protected |
The documentation for this class was generated from the following files: