Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
tweak opacity modifier completions
Brad Cornes <bradlc41@gmail.com>
3 years ago
1 changed files, 4 additions(+), 10 deletions(-)
M packages/tailwindcss-language-service/src/completionProvider.ts -> packages/tailwindcss-language-service/src/completionProvider.ts
diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts
index c8885a042c5eb51664c1109dc4c802983a5013fe..203a2b999086b91225a15a7b99f1b63a86fd79c9 100644
--- a/packages/tailwindcss-language-service/src/completionProvider.ts
+++ b/packages/tailwindcss-language-service/src/completionProvider.ts
@@ -70,6 +70,7 @@       (context.triggerKind === 1 ||
         (context.triggerKind === 2 && context.triggerCharacter === '/')) &&
       partialClassName.includes('/')
     ) {
+      // opacity modifiers
       let beforeSlash = partialClassName.split('/').slice(0, -1).join('/')
       let testClass = beforeSlash + '/[0]'
       let { rules } = jit.generateRules(state, [testClass])
@@ -94,21 +95,14 @@               }
             }
 
             return {
-              label: opacity,
-              detail: stringifyConfigValue(opacities[opacity]),
+              label: className,
               documentation,
               kind,
               sortText: naturalExpand(index),
               data: [className],
               textEdit: {
-                newText: opacity,
-                range: {
-                  ...replacementRange,
-                  start: {
-                    ...replacementRange.start,
-                    character: replacementRange.start.character + beforeSlash.length + 1,
-                  },
-                },
+                newText: className,
+                range: replacementRange,
               },
             }
           }),