Skip to content

Commit 72ed62f

Browse files
author
Brad Cornes
committed
fix zero values in CSS helper completion items
1 parent 8ec7510 commit 72ed62f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/tailwindcss-language-server/src/providers/completionProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ function provideCssHelperCompletions(
273273
const insertClosingBrace: boolean =
274274
text.charAt(text.length - 1) !== ']' &&
275275
(replaceDot || (separator && separator.endsWith('[')))
276+
const detail = stringifyConfigValue(obj[item])
276277

277278
return {
278279
label: item,
@@ -283,7 +284,8 @@ function provideCssHelperCompletions(
283284
: isObject(obj[item])
284285
? CompletionItemKind.Module
285286
: CompletionItemKind.Property,
286-
detail: stringifyConfigValue(obj[item]),
287+
// VS Code bug causes '0' to not display in some cases
288+
detail: detail === '0' ? '0 ' : detail,
287289
documentation: color,
288290
textEdit: {
289291
newText: `${replaceDot ? '[' : ''}${item}${

0 commit comments

Comments
 (0)