File tree 1 file changed +9
-1
lines changed
packages/tailwindcss-language-server/src/util
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import * as path from 'node:path'
3
3
import type { TextDocument } from 'vscode-languageserver-textdocument'
4
4
import type { State } from '@tailwindcss/language-service/src/util/state'
5
5
import { getFileFsPath } from './uri'
6
+ import { normalizePath , normalizeDriveLetter } from '../utils'
6
7
7
8
export default async function isExcluded (
8
9
state : State ,
@@ -11,8 +12,15 @@ export default async function isExcluded(
11
12
) : Promise < boolean > {
12
13
let settings = await state . editor . getConfiguration ( document . uri )
13
14
15
+ file = normalizePath ( file )
16
+ file = normalizeDriveLetter ( file )
17
+
14
18
for ( let pattern of settings . tailwindCSS . files . exclude ) {
15
- if ( picomatch ( path . join ( state . editor . folder , pattern ) ) ( file ) ) {
19
+ pattern = path . join ( state . editor . folder , pattern )
20
+ pattern = normalizePath ( pattern )
21
+ pattern = normalizeDriveLetter ( pattern )
22
+
23
+ if ( picomatch ( pattern ) ( file ) ) {
16
24
return true
17
25
}
18
26
}
You can’t perform that action at this time.
0 commit comments