Skip to content

Commit

Permalink
Show deprecated completion item for microsoft/vscode#79584
Browse files Browse the repository at this point in the history
  • Loading branch information
octref committed Aug 26, 2019
1 parent d45cd5f commit a7d3146
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/cssCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ export class CSSCompletion {
const item: CompletionItem = {
label: entry.name,
documentation: languageFacts.getEntryDescription(entry, this.doesSupportMarkdown()),
deprecated: entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete'),
textEdit: TextEdit.replace(range, insertText),
kind: CompletionItemKind.Property
};
Expand Down Expand Up @@ -325,6 +326,7 @@ export class CSSCompletion {
const item: CompletionItem = {
label: value.name,
documentation: languageFacts.getEntryDescription(value, this.doesSupportMarkdown()),
deprecated: entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete'),
textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertString),
kind: CompletionItemKind.Value,
insertTextFormat
Expand Down Expand Up @@ -609,6 +611,7 @@ export class CSSCompletion {
label: entry.name,
textEdit: TextEdit.replace(this.getCompletionRange(null), entry.name),
documentation: languageFacts.getEntryDescription(entry, this.doesSupportMarkdown()),
deprecated: entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete'),
kind: CompletionItemKind.Keyword
});
});
Expand Down Expand Up @@ -647,6 +650,7 @@ export class CSSCompletion {
label: entry.name,
textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText),
documentation: languageFacts.getEntryDescription(entry, this.doesSupportMarkdown()),
deprecated: entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete'),
kind: CompletionItemKind.Function,
insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
};
Expand All @@ -663,6 +667,7 @@ export class CSSCompletion {
label: entry.name,
textEdit: TextEdit.replace(this.getCompletionRange(existingNode), insertText),
documentation: languageFacts.getEntryDescription(entry, this.doesSupportMarkdown()),
deprecated: entry.status && (entry.status === 'nonstandard' || entry.status === 'obsolete'),
kind: CompletionItemKind.Function,
insertTextFormat: entry.name !== insertText ? SnippetFormat : void 0
};
Expand Down

0 comments on commit a7d3146

Please sign in to comment.