tailwind-ctp-intellisense @master -
refs -
log -
-
https://git.jolheiser.com/tailwind-ctp-intellisense.git
Tailwind intellisense + Catppuccin
Merge branch 'master' into bugfix-style
6 changed files, 18 additions(+), 10 deletions(-)
diff --git a/packages/tailwindcss-language-server/package.json b/packages/tailwindcss-language-server/package.json
index e075b8ef3628bb79d82b9fe94126e6cbc1629e1e..4ee6e4f26a83b25a2085a15b8299fff045ba2135 100644
--- a/packages/tailwindcss-language-server/package.json
+++ b/packages/tailwindcss-language-server/package.json
@@ -2,7 +2,7 @@ {
"name": "@tailwindcss/language-server",
"description": "Tailwind CSS Language Server",
"license": "MIT",
- "version": "0.0.3",
+ "version": "0.0.4",
"scripts": {
"build": "npm run clean && ncc build src/server.ts -o bin --minify && mv bin/index.js bin/tailwindcss-language-server && npm run hashbang",
"clean": "rimraf dist",
diff --git a/packages/tailwindcss-language-server/src/server.ts b/packages/tailwindcss-language-server/src/server.ts
index 04da9276a862fdbe75749045b8f8318c679ff8b1..1dea503890fb15e88605fe6ca67b7f9773d705a7 100644
--- a/packages/tailwindcss-language-server/src/server.ts
+++ b/packages/tailwindcss-language-server/src/server.ts
@@ -228,13 +228,13 @@ for (let change of changes) {
let file = normalizePath(change.file)
for (let ignorePattern of ignore) {
- if (minimatch(file, ignorePattern)) {
+ if (minimatch(file, ignorePattern, { dot: true })) {
continue
}
}
- let isConfigFile = minimatch(file, `**/${CONFIG_FILE_GLOB}`)
- let isPackageFile = minimatch(file, '**/package.json')
+ let isConfigFile = minimatch(file, `**/${CONFIG_FILE_GLOB}`, { dot: true })
+ let isPackageFile = minimatch(file, '**/package.json', { dot: true })
let isDependency = state.dependencies && state.dependencies.includes(change.file)
if (!isConfigFile && !isPackageFile && !isDependency) continue
@@ -414,6 +414,7 @@ ignore: ['**/node_modules'],
onlyFiles: true,
absolute: true,
suppressErrors: true,
+ dot: true,
concurrency: Math.max(os.cpus().length, 1),
})
)
diff --git a/packages/tailwindcss-language-server/src/util/resolveFrom.ts b/packages/tailwindcss-language-server/src/util/resolveFrom.ts
index fa6ef205c5e983b8c9085d6e8d9903d9b218d0e7..0fd209b84780740fbf5061b200d3f4dfe022efae 100644
--- a/packages/tailwindcss-language-server/src/util/resolveFrom.ts
+++ b/packages/tailwindcss-language-server/src/util/resolveFrom.ts
@@ -6,9 +6,7 @@ return ResolverFactory.createResolver({
fileSystem: new CachedInputFileSystem(fs, 4000),
useSyncFileSystemCalls: true,
// cachePredicate: () => false,
- exportsFields: [],
- conditionNames: ['node'],
- extensions: ['.js', '.json', '.node'],
+ conditionNames: ['node', 'require'],
...options,
})
}
diff --git a/packages/tailwindcss-language-service/src/util/color.ts b/packages/tailwindcss-language-service/src/util/color.ts
index 04e23262620cc668580540c090a62730ee67145b..2001b05aabfcbb15d58fe2035515f5060ef3740e 100644
--- a/packages/tailwindcss-language-service/src/util/color.ts
+++ b/packages/tailwindcss-language-service/src/util/color.ts
@@ -40,9 +40,9 @@ }
// https://github.com/khalilgharbaoui/coloregex
const colorRegex = new RegExp(
- `(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?[\\d.]+%?[,\\s]+){2,3}\\s*([\\d.]+%?|var\\([^)]+\\))?\\)|transparent|currentColor|${Object.keys(
+ `(?:^|\\s|,)(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?[\\d.]+%?[,\\s]+){2,3}\\s*([\\d.]+%?|var\\([^)]+\\))?\\)|transparent|currentColor|${Object.keys(
colorNames
- ).join('|')})`,
+ ).join('|')})(?:$|\\s|,)`,
'gi'
)
@@ -52,7 +52,12 @@
return (
str
.match(colorRegex)
- ?.map((color) => color.replace(/var\([^)]+\)/, '1'))
+ ?.map((color) =>
+ color
+ .trim()
+ .replace(/^,|,$/g, '')
+ .replace(/var\([^)]+\)/, '1')
+ )
.map((color) => getKeywordColor(color) ?? new TinyColor(color))
.filter((color) => (color instanceof TinyColor ? color.isValid : true)) ?? []
)
diff --git a/packages/tailwindcss-language-service/src/util/languages.ts b/packages/tailwindcss-language-service/src/util/languages.ts
index ba99c0ea654b59c16a50eba23bd94cbbbd4a66d4..53c35933aac09e6425f0d4b6c5a6e6ca330ee172 100644
--- a/packages/tailwindcss-language-service/src/util/languages.ts
+++ b/packages/tailwindcss-language-service/src/util/languages.ts
@@ -24,6 +24,7 @@ 'mdx',
'mustache',
'njk',
'nunjucks',
+ 'phoenix-heex',
'php',
'razor',
'slim',
diff --git a/packages/vscode-tailwindcss/package.json b/packages/vscode-tailwindcss/package.json
index fc706e08001c8e392c1661372748368dca6e86a0..2c34616f46ccdf2a3354b795158e161461937ec8 100755
--- a/packages/vscode-tailwindcss/package.json
+++ b/packages/vscode-tailwindcss/package.json
@@ -39,6 +39,9 @@ "activationEvents": [
"onStartupFinished"
],
"main": "dist/extension/index.js",
+ "capabilities": {
+ "virtualWorkspaces": false
+ },
"contributes": {
"commands": [
{