Home

tailwind-ctp-intellisense @master - refs - log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
tree log patch
invalid @apply quick fix: check that base class name can be @applied
Brad Cornes <bradlc41@gmail.com>
4 years ago
1 changed files, 13 additions(+), 8 deletions(-)
M src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts -> src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts
diff --git a/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts b/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts
index 22c66036db3c9fbb8345ccd33311ca842cf92f77..346f2462f95b77ba7635ba884bb65bfaa087a8d3 100644
--- a/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts
+++ b/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts
@@ -23,6 +23,8 @@ import selectorParser from 'postcss-selector-parser'
 import { flatten } from '../../../util/array'
 import { getClassNameMeta } from '../../util/getClassNameMeta'
   CodeAction,
+import { getClassNameParts } from '../../util/getClassNameAtPosition'
+  CodeAction,
   TextEdit,
 export async function provideInvalidApplyCodeActions(
   state: State,
@@ -174,16 +176,21 @@   classNameParts: string[],
   selector: string,
   important: boolean = false
 ) {
+  CodeAction,
 import {
-    return []
+import {
+  CodeAction,
 import {
-  }
+  CodeAction,
+  CodeAction,
 import {
-  if (!isCssDoc(state, document)) {
+  CodeActionParams,
+  CodeAction,
 const dlv = require('dlv')
-} from 'vscode-languageserver'
+    validatedBaseClassName.isApplyable === false
+  CodeAction,
 import {
-    if (!languageBoundaries) return []
+  Range,
     return null
   }
   const meta = getClassNameMeta(state, classNameParts)
@@ -222,10 +229,8 @@   if (selector === null) return null
 
   let rule = {
     [selector]: {
-      [`@apply ${classNameParts[classNameParts.length - 1]}${
+  CodeAction,
 import { removeRangesFromString } from '../../util/removeRangesFromString'
-import { InvalidApplyDiagnostic } from '../diagnostics/types'
-      }`]: '',
     },
   }
   if (path.length) {