feat(languages): start the Tailwind CSS language server in Tailwind projects (#5199)

Runs @tailwindcss/language-server next to the language's own servers for HTML, CSS, JS/JSX, TS/TSX, Vue, Svelte and Astro, only below a tailwind.config.* (v3) or a package.json listing tailwindcss in dependencies or devDependencies (v4), with one-click install like the ESLint and Angular servers. JSON root markers (package.json#…) now match a key with any non-null value, not only objects. Adds fixtures/tailwind-app and an ignored real-server test.

Co-authored-by: wildcatDownstairs <26499420+wildcatDownstairs@users.noreply.github.com>
This commit is contained in:
LU XIANGRUI
2026-11-22 18:55:05 +08:00
committed by GitHub
co-authored by wildcatDownstairs
parent b9f9e2668a
commit 0130847bc0
27 changed files with 359 additions and 30 deletions
+11
View File
@@ -109,6 +109,17 @@ codeAction = { disableRuleComment = { enable = true, location = "separateLine" }
# No `rules`: an empty list there means no rule gets fixed.
codeActionOnSave = { mode = "all" }
# Tailwind CSS: class completion, hover and diagnostics, only in a project that uses Tailwind
# (`tailwind.config.*` or `tailwindcss` in package.json). After the language's own servers,
# which answer hover first.
[[language-servers]]
name = "tailwindcss-language-server"
command = "tailwindcss-language-server"
args = ["--stdio"]
root-markers = ["tailwind.config.*", "package.json#dependencies.tailwindcss", "package.json#devDependencies.tailwindcss"]
require-root-marker = true
install-hint = "npm i -g @tailwindcss/language-server"
[debugger]
adapter = "js-debug"
command = "js-debug-adapter"