Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
remove variants filter
Brad Cornes <brad@parall.ax>
4 years ago
1 changed files, 1 additions(+), 26 deletions(-)
M packages/tailwindcss-language-server/src/providers/completionProvider.ts -> packages/tailwindcss-language-server/src/providers/completionProvider.ts
diff --git a/packages/tailwindcss-language-server/src/providers/completionProvider.ts b/packages/tailwindcss-language-server/src/providers/completionProvider.ts
index 0cb4c85122baf11e8eb8de130be7f01061f679ae..472b99551cccd2a1cb78dc1e7e0fe53ec00a9dc8 100644
--- a/packages/tailwindcss-language-server/src/providers/completionProvider.ts
+++ b/packages/tailwindcss-language-server/src/providers/completionProvider.ts
@@ -319,36 +319,11 @@   const parts = match.groups.partial.split(/\s*,\s*/)
 
   if (/\s+/.test(parts[parts.length - 1])) return null
 
-  // TODO: move this to tailwindcss-class-names?
-  let variants = dlv(
-    state.config,
-    ['variants'],
-    dlv(state.config, ['modules'], {})
-  )
-  if (!isObject(variants) && !Array.isArray(variants)) {
-    variants = []
-  }
-  let enabledVariants: string[]
-  if (Array.isArray(variants)) {
-    enabledVariants = variants
-  } else {
-    const uniqueVariants: Set<string> = new Set()
-    for (const mod in variants) {
-      if (!Array.isArray(variants[mod])) continue
-      variants[mod].forEach((v: string) => uniqueVariants.add(v))
-    }
-    enabledVariants = [...uniqueVariants]
-  }
-
-  enabledVariants = state.variants.filter(
-    (x) => enabledVariants.indexOf(x) !== -1 || x === 'default'
-  )
-
   const existingVariants = parts.slice(0, parts.length - 1)
 
   return {
     isIncomplete: false,
-    items: enabledVariants
+    items: state.variants
       .filter((v) => existingVariants.indexOf(v) === -1)
       .map((variant) => ({
         // TODO: detail