tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
update lint setting names
4 changed files, 30 additions(+), 34 deletions(-)
diff --git a/package.json b/package.json
index dfaa22c60c8da06b66a21a2947a85f9bd29c254e..e696a5d0581ae8a9ac43c250bb528ff4ad59b542 100755
--- a/package.json
+++ b/package.json
@@ -87,7 +87,7 @@ "default": "warning",
"markdownDescription": "",
"scope": "language-overridable"
},
- "tailwindCSS.lint.unsupportedApply": {
+ "tailwindCSS.lint.invalidApply": {
"type": "string",
"enum": [
"ignore",
@@ -98,7 +98,7 @@ "default": "error",
"markdownDescription": "",
"scope": "language-overridable"
},
- "tailwindCSS.lint.unknownScreen": {
+ "tailwindCSS.lint.invalidScreen": {
"type": "string",
"enum": [
"ignore",
@@ -109,7 +109,7 @@ "default": "error",
"markdownDescription": "",
"scope": "language-overridable"
},
- "tailwindCSS.lint.unknownVariant": {
+ "tailwindCSS.lint.invalidVariant": {
"type": "string",
"enum": [
"ignore",
@@ -120,7 +120,7 @@ "default": "error",
"markdownDescription": "",
"scope": "language-overridable"
},
- "tailwindCSS.lint.invalidHelperKey": {
+ "tailwindCSS.lint.invalidConfigPath": {
"type": "string",
"enum": [
"ignore",
@@ -131,7 +131,7 @@ "default": "error",
"markdownDescription": "",
"scope": "language-overridable"
},
- "tailwindCSS.lint.unsupportedTailwindDirective": {
+ "tailwindCSS.lint.invalidTailwindDirective": {
"type": "string",
"enum": [
"ignore",
diff --git a/src/lsp/providers/diagnosticsProvider.ts b/src/lsp/providers/diagnosticsProvider.ts
index 4d0e58032a84fcbe68bb55100ada5a682b2943c9..5945837bd639a4360bd03f61298581529aba7f7d 100644
--- a/src/lsp/providers/diagnosticsProvider.ts
+++ b/src/lsp/providers/diagnosticsProvider.ts
@@ -25,12 +25,12 @@ import { isObject } from '../../class-names/isObject'
import { stringToPath } from '../util/stringToPath'
import { closest } from '../util/closest'
-function getUnsupportedApplyDiagnostics(
+function getInvalidApplyDiagnostics(
state: State,
document: TextDocument,
settings: Settings
): Diagnostic[] {
- let severity = settings.lint.unsupportedApply
+ let severity = settings.lint.invalidApply
if (severity === 'ignore') return []
const classNames = findClassNamesInRange(document, undefined, 'css')
@@ -138,12 +138,12 @@
return diagnostics
}
-function getUnknownScreenDiagnostics(
+function getInvalidScreenDiagnostics(
state: State,
document: TextDocument,
settings: Settings
): Diagnostic[] {
- let severity = settings.lint.unknownScreen
+ let severity = settings.lint.invalidScreen
if (severity === 'ignore') return []
let diagnostics: Diagnostic[] = []
@@ -199,12 +199,12 @@
return diagnostics
}
-function getUnknownVariantDiagnostics(
+function getInvalidVariantDiagnostics(
state: State,
document: TextDocument,
settings: Settings
): Diagnostic[] {
- let severity = settings.lint.unknownVariant
+ let severity = settings.lint.invalidVariant
if (severity === 'ignore') return []
let diagnostics: Diagnostic[] = []
@@ -263,12 +263,12 @@
return diagnostics
}
-function getInvalidHelperKeyDiagnostics(
+function getInvalidConfigPathDiagnostics(
state: State,
document: TextDocument,
settings: Settings
): Diagnostic[] {
- let severity = settings.lint.invalidHelperKey
+ let severity = settings.lint.invalidConfigPath
if (severity === 'ignore') return []
let diagnostics: Diagnostic[] = []
@@ -396,12 +396,12 @@
return diagnostics
}
-function getUnsupportedTailwindDirectiveDiagnostics(
+function getInvalidTailwindDirectiveDiagnostics(
state: State,
document: TextDocument,
settings: Settings
): Diagnostic[] {
- let severity = settings.lint.unsupportedTailwindDirective
+ let severity = settings.lint.invalidTailwindDirective
if (severity === 'ignore') return []
let diagnostics: Diagnostic[] = []
@@ -473,15 +473,11 @@
const diagnostics: Diagnostic[] = settings.validate
? [
...getUtilityConflictDiagnostics(state, document, settings),
- ...getUnsupportedApplyDiagnostics(state, document, settings),
- ...getUnknownScreenDiagnostics(state, document, settings),
- ...getUnknownVariantDiagnostics(state, document, settings),
- ...getInvalidHelperKeyDiagnostics(state, document, settings),
- ...getUnsupportedTailwindDirectiveDiagnostics(
- state,
- document,
- settings
- ),
+ ...getInvalidApplyDiagnostics(state, document, settings),
+ ...getInvalidScreenDiagnostics(state, document, settings),
+ ...getInvalidVariantDiagnostics(state, document, settings),
+ ...getInvalidConfigPathDiagnostics(state, document, settings),
+ ...getInvalidTailwindDirectiveDiagnostics(state, document, settings),
]
: []
diff --git a/src/lsp/server.ts b/src/lsp/server.ts
index 8e9addff1790460044f406c65302aadc70cc75c6..3d3753228e38f037757b3918bba07360142791b1 100644
--- a/src/lsp/server.ts
+++ b/src/lsp/server.ts
@@ -44,11 +44,11 @@ includeLanguages: {},
validate: true,
lint: {
utilityConflicts: 'warning',
- unsupportedApply: 'error',
- unknownScreen: 'error',
- unknownVariant: 'error',
- invalidHelperKey: 'error',
- unsupportedTailwindDirective: 'error',
+ invalidApply: 'error',
+ invalidScreen: 'error',
+ invalidVariant: 'error',
+ invalidConfigPath: 'error',
+ invalidTailwindDirective: 'error',
},
}
let globalSettings: Settings = defaultSettings
diff --git a/src/lsp/util/state.ts b/src/lsp/util/state.ts
index 4df2d1e168fc1f84badf86058b868218444f3cbf..091650be432c4382b4fdb0430501df58d04c8e9c 100644
--- a/src/lsp/util/state.ts
+++ b/src/lsp/util/state.ts
@@ -34,11 +34,11 @@ includeLanguages: Record<string, string>
validate: boolean
lint: {
utilityConflicts: DiagnosticSeveritySetting
- unsupportedApply: DiagnosticSeveritySetting
- unknownScreen: DiagnosticSeveritySetting
- unknownVariant: DiagnosticSeveritySetting
- invalidHelperKey: DiagnosticSeveritySetting
- unsupportedTailwindDirective: DiagnosticSeveritySetting
+ invalidApply: DiagnosticSeveritySetting
+ invalidScreen: DiagnosticSeveritySetting
+ invalidVariant: DiagnosticSeveritySetting
+ invalidConfigPath: DiagnosticSeveritySetting
+ invalidTailwindDirective: DiagnosticSeveritySetting
}
}