Add Tailwind CSS language server to CSS language settings - #39517
Add Tailwind CSS language server to CSS language settings#39517jsparkdev wants to merge 1 commit into
Conversation
|
Hey, @jsparkdev thanks for the PR! I've been chatting with @thecrypticace from the Tailwind team and there's a possibility this could be fixed on the Tailwind LSP itself. Let's wait for an update from Jordan before moving forward with this (I do want to have it fixed, though. I've been seeing these same warnings for a while now, so thanks for jumping into it!). |
|
Got it. Thank you for letting me know! |
|
It's not that we'd "fix" it in the Tailwind CSS language server — Zed would still require changes but this one is not sufficient as it doesn't provide general CSS completions at all. We've only recently published our fork of VSCode's CSS language server in our I think the best course of action would be to match our VSCode extension behavior:
The LSP language ID of the new language is These could probably be integrated into the one language server binary but they've historically been separate and, for VSCode, the second one is booted on demand when you first open a CSS file in the "Tailwind CSS" language. |
|
To fix the warnings in the short term you can override the "lsp": {
"vscode-css-language-server": {
"binary": {
"path": "/Users/jordanpittman/Library/Caches/fnm_multishells/57219_1755626184882/bin/node",
"arguments": [
"/Users/jordanpittman/Library/Application Support/Zed/languages/tailwindcss-language-server/node_modules/.bin/css-language-server",
"--stdio"
]
}
}
}You'll want to update |
|
hey guys! any progress on this? Just checking by, to better set my expectations |
Closes #44904 Adds the Tailwind CSS LSP as suggested here: #39517 (comment). This allows users to use the Tailwind CSS LSP for CSS files, to support Tailwind specific rules. Docs will be added in a separate PR after this is released Release Notes: - Add Tailwind CSS Mode support, for Tailwind specific CSS rules like `@apply`, `@layer`, and `@theme`.
Closes #44904 Adds the Tailwind CSS LSP as suggested here: #39517 (comment). This allows users to use the Tailwind CSS LSP for CSS files, to support Tailwind specific rules. Docs will be added in a separate PR after this is released Release Notes: - Add Tailwind CSS Mode support, for Tailwind specific CSS rules like `@apply`, `@layer`, and `@theme`.
Closes #44904 Adds the Tailwind CSS LSP as suggested here: zed-industries/zed#39517 (comment). This allows users to use the Tailwind CSS LSP for CSS files, to support Tailwind specific rules. Docs will be added in a separate PR after this is released Release Notes: - Add Tailwind CSS Mode support, for Tailwind specific CSS rules like `@apply`, `@layer`, and `@theme`.
Closes zed-industries#44904 Adds the Tailwind CSS LSP as suggested here: zed-industries#39517 (comment). This allows users to use the Tailwind CSS LSP for CSS files, to support Tailwind specific rules. Docs will be added in a separate PR after this is released Release Notes: - Add Tailwind CSS Mode support, for Tailwind specific CSS rules like `@apply`, `@layer`, and `@theme`.
Although Zed offers native support for Tailwind CSS, users may encounter syntax warnings for custom at-rules and directives (e.g.,
@apply,@tailwind) if no language server is explicitly configured, as detailed in the official guide.This pull request addresses this by adding the Tailwind CSS Language Server to the default configuration. This ensures a smooth, warning-free editing experience for Tailwind CSS stylesheets right out of the box, requiring zero configuration from the developer.
Before
After
Release Notes: