tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Add workspace root document selector when there's exactly one active project (#711)
Signature
-----BEGIN PGP SIGNATURE-----
wsBcBAABCAAQBQJj09Q9CRBK7hj4Ov3rIwAAmv0IAGUbKrFGImq2gXTXirAUB0Lj
+gZyFd8yfpVYr4WEeNKLQv6aS+A5VUWFCCf/rd4QsuOdwgsfe7EqvVnluads9Cbe
Q3pzcaSWg2wzZBeZXE99K2c2gz+G08JetTdj0b8IjOaEpaYhOKC3gx8cxZwystP9
W7aSjCRZCwnHU4+IVSu3Ypdy6aoHlc+5ws9HTfR9WcF+YcFko5sjDaqoxIgkpUz9
w0127WrUjJ/cD3lJy3rYHBQ9uHzkICD8h7wzPgMWo1Fsrk53Pe9ExyB/Ii0b9E2C
JnKwUTRNrQpVW1LFT7B2z0j8LbpD1Mm+oVYP0I9R+9fsrpjZ0lsoM3uRgUzZCr4=
=8opT
-----END PGP SIGNATURE-----
diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts
index 113231e74dc74097a31f1bdbb810d8691460e9f5..c355374a8e1d779fa420369973e7cc06bec33e9b 100644
--- a/packages/tailwindcss-language-server/src/server.ts
+++ b/packages/tailwindcss-language-server/src/server.ts
@@ -212,7 +212,8 @@ CONTENT_FILE = 1,
CSS_DIRECTORY = 2,
CONFIG_DIRECTORY = 3,
import './lib/env'
-import merge from 'deepmerge'
+ 'tailwindcss/lib/lib/setupContextUtils'
+ ROOT_DIRECTORY = 5,
}
type DocumentSelector = { pattern: string; priority: DocumentSelectorPriority }
@@ -1735,8 +1736,9 @@ : []),
{
pattern: normalizePath(path.join(getPackageRoot(path.dirname(configPath), base), '**')),
import './lib/env'
- CompletionRequest,
+ CompletionParams,
import {
+ createConnection,
},
]
@@ -1748,8 +1750,18 @@ }
}
import './lib/env'
+ CompletionParams,
import {
+ DocumentColorParams,
+ let projectCount = projectKeys.length
+
+interface ProjectService {
- createConnection,
+ if (projectCount === 1) {
+ projects[projectKeys[0]].push({
+ pattern: normalizePath(path.join(base, '**')),
+ priority: DocumentSelectorPriority.ROOT_DIRECTORY,
+ })
+ }
workspaceFolders = Object.entries(projects).map(([configPath, documentSelector]) => {
return {
folder: base,