File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
tailwindcss-language-server/src Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -980,11 +980,11 @@ async function createProjectService(
980
980
dispose ( )
981
981
}
982
982
} ,
983
- onUpdateSettings ( settings : any ) : void {
983
+ async onUpdateSettings ( settings : any ) : Promise < void > {
984
984
documentSettingsCache . clear ( )
985
985
let previousExclude =
986
986
state . editor . globalSettings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE
987
- state . editor . globalSettings = settings
987
+ state . editor . globalSettings = await state . editor . getConfiguration ( )
988
988
if ( ! equal ( previousExclude , settings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE ) ) {
989
989
tryInit ( )
990
990
} else {
Original file line number Diff line number Diff line change @@ -88,12 +88,15 @@ function getGlobalExcludePatterns(scope: ConfigurationScope): string[] {
88
88
return Object . entries ( Workspace . getConfiguration ( 'files' , scope ) . get ( 'exclude' ) )
89
89
. filter ( ( [ , value ] ) => value === true )
90
90
. map ( ( [ key ] ) => key )
91
+ . filter ( Boolean )
91
92
}
92
93
93
94
function getExcludePatterns ( scope : ConfigurationScope ) : string [ ] {
94
95
return [
95
96
...getGlobalExcludePatterns ( scope ) ,
96
- ...( < string [ ] > Workspace . getConfiguration ( 'tailwindCSS' , scope ) . get ( 'files.exclude' ) ) ,
97
+ ...( < string [ ] > Workspace . getConfiguration ( 'tailwindCSS' , scope ) . get ( 'files.exclude' ) ) . filter (
98
+ Boolean
99
+ ) ,
97
100
]
98
101
}
99
102
@@ -109,12 +112,12 @@ function isExcluded(file: string, folder: WorkspaceFolder): boolean {
109
112
return false
110
113
}
111
114
112
- function mergeExcludes ( settings : WorkspaceConfiguration , scope : ConfigurationScope ) {
115
+ function mergeExcludes ( settings : WorkspaceConfiguration , scope : ConfigurationScope ) : any {
113
116
return {
114
117
...settings ,
115
118
files : {
116
119
...settings . files ,
117
- exclude : [ ... getGlobalExcludePatterns ( scope ) , ... settings . files . exclude ] ,
120
+ exclude : getExcludePatterns ( scope ) ,
118
121
} ,
119
122
}
120
123
}
You can’t perform that action at this time.
0 commit comments