File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed
packages/vscode-tailwindcss Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Prerelease
4
4
5
- - Fix detection of v3 insiders builds ([ #1007 ] ( https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1007 ) )
5
+ - Fix detection of v3 insiders builds ([ #1007 ] ( https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1007 ) )
6
+ - Make sure language-specific settings are passed to our language server ([ #1006 ] ( https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1006 ) )
6
7
7
8
## 0.12.3
8
9
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