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 22
33## Prerelease
44
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 ) )
67
78## 0.12.3
89
Original file line number Diff line number Diff line change @@ -493,7 +493,23 @@ export async function activate(context: ExtensionContext) {
493493 workspace : {
494494 configuration : ( params ) => {
495495 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+ }
497513
498514 let settings = Workspace . getConfiguration ( section , scope )
499515
You can’t perform that action at this time.
0 commit comments