tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
update for at-apply changes in v2
3 changed files, 6 additions(+), 4 deletions(-)
diff --git a/packages/tailwindcss-language-service/src/completionProvider.ts b/packages/tailwindcss-language-service/src/completionProvider.ts
index 0c381a4996e0064f4f97ef545dbcc393ef766cd6..cef47b7b8425fe69aecbe98c93608725a8bf850c 100644
--- a/packages/tailwindcss-language-service/src/completionProvider.ts
+++ b/packages/tailwindcss-language-service/src/completionProvider.ts
@@ -199,7 +199,7 @@ end: position,
},
(item) => {
if (item.kind === 9) {
- return flagEnabled(state, 'applyComplexClasses')
+ return semver.gte(state.version, '2.0.0-alpha.1') || flagEnabled(state, 'applyComplexClasses')
}
let validated = validateApply(state, item.data)
return validated !== null && validated.isApplyable === true
diff --git a/packages/tailwindcss-language-service/src/diagnostics/getInvalidApplyDiagnostics.ts b/packages/tailwindcss-language-service/src/diagnostics/getInvalidApplyDiagnostics.ts
index 11d835dcd9479cd0b07c9aaf36e32c909f7d9463..3e6d03e23a476d4c9ae398adffb0738d7f68060a 100644
--- a/packages/tailwindcss-language-service/src/diagnostics/getInvalidApplyDiagnostics.ts
+++ b/packages/tailwindcss-language-service/src/diagnostics/getInvalidApplyDiagnostics.ts
@@ -3,7 +3,6 @@ import { InvalidApplyDiagnostic, DiagnosticKind } from './types'
import { Settings, State } from '../util/state'
import type { TextDocument, DiagnosticSeverity } from 'vscode-languageserver'
import { validateApply } from '../util/validateApply'
-import { flagEnabled } from '../util/flagEnabled'
export function getInvalidApplyDiagnostics(
state: State,
@@ -12,7 +11,6 @@ settings: Settings
): InvalidApplyDiagnostic[] {
let severity = settings.lint.invalidApply
if (severity === 'ignore') return []
- if (flagEnabled(state, 'applyComplexClasses')) return []
const classNames = findClassNamesInRange(document, undefined, 'css')
diff --git a/packages/tailwindcss-language-service/src/util/validateApply.ts b/packages/tailwindcss-language-service/src/util/validateApply.ts
index 5a17956593549d6cf08c281ad4a43afd1faf3fdc..e661c4cd22d880785499e4b86c1948a43788a3bc 100644
--- a/packages/tailwindcss-language-service/src/util/validateApply.ts
+++ b/packages/tailwindcss-language-service/src/util/validateApply.ts
@@ -1,6 +1,7 @@
import { State } from './state'
import { getClassNameMeta } from './getClassNameMeta'
import { flagEnabled } from './flagEnabled'
+import semver from 'semver'
export function validateApply(
state: State,
@@ -9,8 +10,11 @@ ): { isApplyable: true } | { isApplyable: false; reason: string } | null {
const meta = getClassNameMeta(state, classNameOrParts)
if (!meta) return null
+ if (
+
import { State } from './state'
-import { State } from './state'
+ flagEnabled(state, 'applyComplexClasses')
+ ) {
return { isApplyable: true }
}