Skip to content

Commit b26e122

Browse files
authored
Add automatic support for multi-config workspaces, including @config resolution (#633)
* wip * wip * Boot client if a CSS file contains `@config` * wip * Check document exists * wip * Fix duplicate document selector * wip * Use enum for document selector priorities * Delete unused functions * Remove unused state type * Share glob patterns * Update config file glob * fix logs * Fix filename checks on Windows * Don't show error popups * wip * handle negated content paths * Handle non-tailwind dependency installs * add package root to document selectors * tidy * wip * dedupe document selectors * Fix `@config` regex * Fix document selectors when using `experimental.configFile` * Remove log
1 parent 68750d8 commit b26e122

File tree

9 files changed

+914
-351
lines changed

9 files changed

+914
-351
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const CONFIG_GLOB = '{tailwind,tailwind.config,tailwind.*.config,tailwind.config.*}.{js,cjs}'
2+
export const PACKAGE_LOCK_GLOB = '{package-lock.json,yarn.lock,pnpm-lock.yaml}'
3+
export const CSS_GLOB = '*.{css,scss,sass,less,pcss}'

packages/tailwindcss-language-server/src/lsp/diagnosticsProvider.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,3 @@ export function clearDiagnostics(state: State, document: TextDocument): void {
2020
diagnostics: [],
2121
})
2222
}
23-
24-
export function clearAllDiagnostics(state: State): void {
25-
state.editor?.documents.all().forEach((document) => {
26-
clearDiagnostics(state, document)
27-
})
28-
}
29-
30-
export function updateAllDiagnostics(state: State): void {
31-
state.editor?.documents.all().forEach((document) => {
32-
provideDiagnostics(state, document)
33-
})
34-
}

0 commit comments

Comments
 (0)