mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +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);
|
||||
}
|
||||
|
||||
const tags: languages.CompletionItemTag[] = [];
|
||||
if (entry.kindModifiers?.indexOf('deprecated') !== -1)
|
||||
tags.push(languages.CompletionItemTag.Deprecated);
|
||||
|
||||
return {
|
||||
uri: resource,
|
||||
position: position,
|
||||
|
|
@ -467,7 +471,8 @@ export class SuggestAdapter
|
|||
label: entry.name,
|
||||
insertText: entry.name,
|
||||
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