Skip to content

Commit 77e8f02

Browse files
committed
Mark SCSS at keywords as CompletionItemKind.Keyword. Fix microsoft/vscode#50803
1 parent 9530888 commit 77e8f02

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

src/services/scssCompletion.ts

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,57 +125,68 @@ export class SCSSCompletion extends CSSCompletion {
125125
private static scssAtDirectives = [
126126
{
127127
label: "@extend",
128-
documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector.")
128+
documentation: localize("scss.builtin.@extend", "Inherits the styles of another selector."),
129+
kind: CompletionItemKind.Keyword
129130
},
130131
{
131132
label: "@at-root",
132-
documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document.")
133+
documentation: localize("scss.builtin.@at-root", "Causes one or more rules to be emitted at the root of the document."),
134+
kind: CompletionItemKind.Keyword
133135
},
134136
{
135137
label: "@debug",
136-
documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files.")
138+
documentation: localize("scss.builtin.@debug", "Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),
139+
kind: CompletionItemKind.Keyword
137140
},
138141
{
139142
label: "@warn",
140-
documentation: localize("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option.")
143+
documentation: localize("scss.builtin.@warn", "Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),
144+
kind: CompletionItemKind.Keyword
141145
},
142146
{
143147
label: "@error",
144-
documentation: localize("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions.")
148+
documentation: localize("scss.builtin.@error", "Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),
149+
kind: CompletionItemKind.Keyword
145150
},
146151
{
147152
label: "@if",
148153
documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
149154
insertText: "@if ${1:expr} {\n\t$0\n}",
150-
insertTextFormat: InsertTextFormat.Snippet
155+
insertTextFormat: InsertTextFormat.Snippet,
156+
kind: CompletionItemKind.Keyword
151157
},
152158
{
153159
label: "@for",
154160
documentation: localize("scss.builtin.@for", "For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause.",),
155161
insertText: "@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n\t$0\n}",
156-
insertTextFormat: InsertTextFormat.Snippet
162+
insertTextFormat: InsertTextFormat.Snippet,
163+
kind: CompletionItemKind.Keyword
157164
},
158165
{
159166
label: "@each",
160167
documentation: localize("scss.builtin.@each", "Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`.",),
161168
insertText: "@each \\$${1:var} in ${2:list} {\n\t$0\n}",
162-
insertTextFormat: InsertTextFormat.Snippet
169+
insertTextFormat: InsertTextFormat.Snippet,
170+
kind: CompletionItemKind.Keyword
163171
},
164172
{
165173
label: "@while",
166174
documentation: localize("scss.builtin.@while", "While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`.",),
167175
insertText: "@while ${1:condition} {\n\t$0\n}",
168-
insertTextFormat: InsertTextFormat.Snippet
176+
insertTextFormat: InsertTextFormat.Snippet,
177+
kind: CompletionItemKind.Keyword
169178
},
170179
{
171180
label: "@mixin",
172181
documentation: localize("scss.builtin.@mixin", "Defines styles that can be re-used throughout the stylesheet with `@include`.",),
173182
insertText: "@mixin ${1:name} {\n\t$0\n}",
174-
insertTextFormat: InsertTextFormat.Snippet
183+
insertTextFormat: InsertTextFormat.Snippet,
184+
kind: CompletionItemKind.Keyword
175185
},
176186
{
177187
label: "@include",
178-
documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule.")
188+
documentation: localize("scss.builtin.@include", "Includes the styles defined by another mixin into the current rule."),
189+
kind: CompletionItemKind.Keyword
179190
},
180191
];
181192

0 commit comments

Comments
 (0)