tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
diff --git a/packages/tailwindcss-language-server/src/providers/completionProvider.ts b/packages/tailwindcss-language-server/src/providers/completionProvider.ts
index 472b99551cccd2a1cb78dc1e7e0fe53ec00a9dc8..518d1e70f9309fb6f445a7c7d81998703579b6b9 100644
--- a/packages/tailwindcss-language-server/src/providers/completionProvider.ts
+++ b/packages/tailwindcss-language-server/src/providers/completionProvider.ts
@@ -66,10 +66,14 @@ return {
isIncomplete: false,
items: Object.keys(isSubset ? subset : state.classNames.classNames).map(
(className) => {
+ let label = className
let kind: CompletionItemKind = CompletionItemKind.Constant
let documentation: string = null
+ let command: any
if (isContextItem(state, [...subsetKey, className])) {
kind = CompletionItemKind.Module
+ command = { title: '', command: 'editor.action.triggerSuggest' }
+ label += state.separator
} else {
const color = getColor(state, [className])
if (color) {
@@ -79,12 +83,13 @@ }
}
return {
- label: className,
+ label,
kind,
documentation,
+ command,
data: [...subsetKey, className],
textEdit: {
- newText: className,
+ newText: label,
range: replacementRange,
},
}