fix zero values in CSS helper completion items

master
Brad Cornes 2020-04-28 00:30:32 +01:00
parent 8ec7510e02
commit 72ed62f730
1 changed files with 3 additions and 1 deletions

View File

@ -273,6 +273,7 @@ function provideCssHelperCompletions(
const insertClosingBrace: boolean = const insertClosingBrace: boolean =
text.charAt(text.length - 1) !== ']' && text.charAt(text.length - 1) !== ']' &&
(replaceDot || (separator && separator.endsWith('['))) (replaceDot || (separator && separator.endsWith('[')))
const detail = stringifyConfigValue(obj[item])
return { return {
label: item, label: item,
@ -283,7 +284,8 @@ function provideCssHelperCompletions(
: isObject(obj[item]) : isObject(obj[item])
? CompletionItemKind.Module ? CompletionItemKind.Module
: CompletionItemKind.Property, : CompletionItemKind.Property,
detail: stringifyConfigValue(obj[item]), // VS Code bug causes '0' to not display in some cases
detail: detail === '0' ? '0 ' : detail,
documentation: color, documentation: color,
textEdit: { textEdit: {
newText: `${replaceDot ? '[' : ''}${item}${ newText: `${replaceDot ? '[' : ''}${item}${