File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/vscode-tailwindcss/src Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -493,7 +493,23 @@ export async function activate(context: ExtensionContext) {
493
493
workspace : {
494
494
configuration : ( params ) => {
495
495
return params . items . map ( ( { section, scopeUri } ) => {
496
- let scope : ConfigurationScope | null = scopeUri ? Uri . parse ( scopeUri ) : null
496
+ let scope : ConfigurationScope | null = null
497
+
498
+ if ( scopeUri ) {
499
+ let uri = Uri . parse ( scopeUri )
500
+ let doc = Workspace . textDocuments . find ( ( doc ) => doc . uri . toString ( ) === scopeUri )
501
+
502
+ // Make sure we ask VSCode for language specific settings for
503
+ // the document as it does not do this automatically
504
+ if ( doc ) {
505
+ scope = {
506
+ uri,
507
+ languageId : doc . languageId ,
508
+ }
509
+ } else {
510
+ scope = uri
511
+ }
512
+ }
497
513
498
514
let settings = Workspace . getConfiguration ( section , scope )
499
515
You can’t perform that action at this time.
0 commit comments