add SymbolTag, make tag a propertiy, #23927

This commit is contained in:
Johannes Rieken
2019-08-23 09:03:18 +02:00
parent f7fe25dcfc
commit 62c31b7154
15 changed files with 71 additions and 40 deletions

View File

@@ -70,7 +70,7 @@ class DocumentSymbolAdapter {
const element = <modes.DocumentSymbol>{
name: info.name || '!!MISSING: name!!',
kind: typeConvert.SymbolKind.from(info.kind),
kindTags: [],
tags: [],
detail: undefined!, // Strict null override — avoid changing behavior
containerName: info.containerName,
range: typeConvert.Range.from(info.location.range),
@@ -728,6 +728,7 @@ class SuggestAdapter {
//
a: item.label,
b: typeConvert.CompletionItemKind.from(item.kind),
n: item.tags && item.tags.map(typeConvert.CompletionItemTag.from),
c: item.detail,
d: typeof item.documentation === 'undefined' ? undefined : typeConvert.MarkdownString.fromStrict(item.documentation),
e: item.sortText,
@@ -739,12 +740,6 @@ class SuggestAdapter {
m: this._commands.toInternal(item.command, disposables),
};
// kind2
if (typeof item.kind2 === 'object') {
result.b = typeConvert.CompletionItemKind.from(item.kind2.kind);
result.n = item.kind2.tags.map(typeConvert.CompletionItemKindTag.from);
}
// 'insertText'-logic
if (item.textEdit) {
result.h = item.textEdit.newText;