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(
980980 dispose ( )
981981 }
982982 } ,
983- onUpdateSettings ( settings : any ) : void {
983+ async onUpdateSettings ( settings : any ) : Promise < void > {
984984 documentSettingsCache . clear ( )
985985 let previousExclude =
986986 state . editor . globalSettings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE
987- state . editor . globalSettings = settings
987+ state . editor . globalSettings = await state . editor . getConfiguration ( )
988988 if ( ! equal ( previousExclude , settings . tailwindCSS . files ?. exclude ?? DEFAULT_FILES_EXCLUDE ) ) {
989989 tryInit ( )
990990 } else {
Original file line number Diff line number Diff line change @@ -88,12 +88,15 @@ function getGlobalExcludePatterns(scope: ConfigurationScope): string[] {
8888 return Object . entries ( Workspace . getConfiguration ( 'files' , scope ) . get ( 'exclude' ) )
8989 . filter ( ( [ , value ] ) => value === true )
9090 . map ( ( [ key ] ) => key )
91+ . filter ( Boolean )
9192}
9293
9394function getExcludePatterns ( scope : ConfigurationScope ) : string [ ] {
9495 return [
9596 ...getGlobalExcludePatterns ( scope ) ,
96- ...( < string [ ] > Workspace . getConfiguration ( 'tailwindCSS' , scope ) . get ( 'files.exclude' ) ) ,
97+ ...( < string [ ] > Workspace . getConfiguration ( 'tailwindCSS' , scope ) . get ( 'files.exclude' ) ) . filter (
98+ Boolean
99+ ) ,
97100 ]
98101}
99102
@@ -109,12 +112,12 @@ function isExcluded(file: string, folder: WorkspaceFolder): boolean {
109112 return false
110113}
111114
112- function mergeExcludes ( settings : WorkspaceConfiguration , scope : ConfigurationScope ) {
115+ function mergeExcludes ( settings : WorkspaceConfiguration , scope : ConfigurationScope ) : any {
113116 return {
114117 ...settings ,
115118 files : {
116119 ...settings . files ,
117- exclude : [ ... getGlobalExcludePatterns ( scope ) , ... settings . files . exclude ] ,
120+ exclude : getExcludePatterns ( scope ) ,
118121 } ,
119122 }
120123}
You can’t perform that action at this time.
0 commit comments