@@ -109,6 +109,7 @@ const TRIGGER_CHARACTERS = [
109
109
// JIT opacity modifiers
110
110
'/' ,
111
111
] as const
112
+ const DEFAULT_FILES_EXCLUDE = [ '**/.git/**' , '**/.svn/**' , '**/.hg/**' , '**/node_modules/**' ]
112
113
113
114
const colorNames = Object . keys ( namedColors )
114
115
@@ -257,7 +258,7 @@ async function createProjectService(
257
258
let registrations : Promise < BulkUnregistration >
258
259
259
260
let chokidarWatcher : chokidar . FSWatcher
260
- let ignore = state . editor . globalSettings . tailwindCSS . files ?. exclude ?? [ ]
261
+ let ignore = state . editor . globalSettings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE
261
262
262
263
function onFileEvents ( changes : Array < { file : string ; type : FileChangeType } > ) : void {
263
264
let needsInit = false
@@ -450,7 +451,7 @@ async function createProjectService(
450
451
let [ configPath ] = (
451
452
await glob ( [ `**/${ CONFIG_FILE_GLOB } ` ] , {
452
453
cwd : folder ,
453
- ignore : state . editor . globalSettings . tailwindCSS . files ?. exclude ?? [ ] ,
454
+ ignore : state . editor . globalSettings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE ,
454
455
onlyFiles : true ,
455
456
absolute : true ,
456
457
suppressErrors : true ,
@@ -983,9 +984,10 @@ async function createProjectService(
983
984
} ,
984
985
onUpdateSettings ( settings : any ) : void {
985
986
documentSettingsCache . clear ( )
986
- let previousExclude = state . editor . globalSettings . tailwindCSS . files ?. exclude ?? [ ]
987
+ let previousExclude =
988
+ state . editor . globalSettings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE
987
989
state . editor . globalSettings = settings
988
- if ( ! equal ( previousExclude , settings . tailwindCSS . files ?. exclude ?? [ ] ) ) {
990
+ if ( ! equal ( previousExclude , settings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE ) ) {
989
991
tryInit ( )
990
992
} else {
991
993
if ( state . enabled ) {
0 commit comments