Skip to content

Commit 9530888

Browse files
committed
1 parent 756d6e4 commit 9530888

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/services/scssCompletion.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ export class SCSSCompletion extends CSSCompletion {
145145
},
146146
{
147147
label: "@if",
148-
documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`.")
148+
documentation: localize("scss.builtin.@if", "Includes the body if the expression does not evaluate to `false` or `null`."),
149+
insertText: "@if ${1:expr} {\n\t$0\n}",
150+
insertTextFormat: InsertTextFormat.Snippet
149151
},
150152
{
151153
label: "@for",

src/test/scss/scssCompletion.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ suite('SCSS - Completions', () => {
9595
{ label: '@debug' },
9696
{ label: '@warn' },
9797
{ label: '@error' },
98-
{ label: '@if' },
98+
{ label: '@if', insertTextFormat: InsertTextFormat.Snippet },
9999
{ label: '@for', insertTextFormat: InsertTextFormat.Snippet },
100100
{ label: '@each', insertTextFormat: InsertTextFormat.Snippet },
101101
{ label: '@while', insertTextFormat: InsertTextFormat.Snippet },
@@ -166,8 +166,7 @@ suite('SCSS - Completions', () => {
166166
{ label: '@while' },
167167
{ label: '@mixin' },
168168
{ label: '@include' }
169-
170169
]
171-
})
170+
});
172171
});
173172
});

0 commit comments

Comments
 (0)