mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Add deprecated tag to suggestion if entry is marked as deprecated
This commit is contained in:
parent
fce6b6161e
commit
a258f3a296
1 changed files with 6 additions and 1 deletions
|
|
@ -460,6 +460,10 @@ export class SuggestAdapter
|
||||||
range = new Range(p1.lineNumber, p1.column, p2.lineNumber, p2.column);
|
range = new Range(p1.lineNumber, p1.column, p2.lineNumber, p2.column);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tags: languages.CompletionItemTag[] = [];
|
||||||
|
if (entry.kindModifiers?.indexOf('deprecated') !== -1)
|
||||||
|
tags.push(languages.CompletionItemTag.Deprecated);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
uri: resource,
|
uri: resource,
|
||||||
position: position,
|
position: position,
|
||||||
|
|
@ -467,7 +471,8 @@ export class SuggestAdapter
|
||||||
label: entry.name,
|
label: entry.name,
|
||||||
insertText: entry.name,
|
insertText: entry.name,
|
||||||
sortText: entry.sortText,
|
sortText: entry.sortText,
|
||||||
kind: SuggestAdapter.convertKind(entry.kind)
|
kind: SuggestAdapter.convertKind(entry.kind),
|
||||||
|
tags
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue