-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TailwindCSS LSP doesn't work in an Astro project #12402
Comments
@Moshyfawn I'm facing the same issue as well. I tried all sorts of configuration. Tailwind LSP is actually running properly, it unfortunately does not recognize or trigger for Astro tags to be specific. Also, from your logs, looks like only the On the other hand, if you are in a What's your |
I'm also running into this issue with my Astro project |
@Jonnotie What's your |
This fixes #12402. We already had the `tailwind-language-server` config in Astro's `config.toml` here: https://github.com/zed-industries/zed/blob/fd39f20842967f0fb8a6c508bc2e1ebaefbaf15f/extensions/astro/languages/astro/config.toml#L17-L23 But it's not enough to add `overrides.string` to the `config.toml`, you also need an `overrides.scm` file that sets the overrides. And, tricky bit, when you add a single override to the `overrides.scm` file you have to add all of them that Zed knows about. In my case, I had to add `@comment` too, because Zed somehow expects that.
99% sure I fixed it here: #12741 Thanks for the amazing reproduction steps, @Moshyfawn. |
This fixes #12402. We already had the `tailwind-language-server` config in Astro's `config.toml` here: https://github.com/zed-industries/zed/blob/fd39f20842967f0fb8a6c508bc2e1ebaefbaf15f/extensions/astro/languages/astro/config.toml#L17-L23 But it's not enough to add `overrides.string` to the `config.toml`, you also need an `overrides.scm` file that sets the overrides. And, tricky bit, when you add a single override to the `overrides.scm` file you have to add all of them that Zed knows about. In my case, I had to add `@comment` too, because Zed somehow expects that. Release Notes: - Fixed `tailwind-language-server` not working in attributes inside of `*.astro` files. ([#12402](#12402)). Demo/proof: https://github.com/zed-industries/zed/assets/1185253/05677a2d-831d-4e05-a1a2-4d1730ce2a46
I bumped the Astro extension to 0.0.3 here: zed-industries/extensions#880 Should be available in a few minutes and include the fix here. |
@mrnugget Thank you for your amazing work Thorsten. 👏 |
Can confirm, the autocompletions are there now! Thanks 🙏 |
This fixes zed-industries#12402. We already had the `tailwind-language-server` config in Astro's `config.toml` here: https://github.com/zed-industries/zed/blob/fd39f20842967f0fb8a6c508bc2e1ebaefbaf15f/extensions/astro/languages/astro/config.toml#L17-L23 But it's not enough to add `overrides.string` to the `config.toml`, you also need an `overrides.scm` file that sets the overrides. And, tricky bit, when you add a single override to the `overrides.scm` file you have to add all of them that Zed knows about. In my case, I had to add `@comment` too, because Zed somehow expects that. Release Notes: - Fixed `tailwind-language-server` not working in attributes inside of `*.astro` files. ([zed-industries#12402](zed-industries#12402)). Demo/proof: https://github.com/zed-industries/zed/assets/1185253/05677a2d-831d-4e05-a1a2-4d1730ce2a46
Check for existing issues
Describe the bug / provide steps to reproduce it
Reproduction steps
pnpm create astro
- select all default options - open the project in Zed.pnpm astro add tailwind
- chooseY
for all prompts.src/pages/index.astro
- try adding a TailwindCSS class to themain
tag:editor: show completions
from the command palette.Expected behaviour
The expected behaviour in both cases
3
and5
would be for the TailwindCSS classes autocompletions to be displayed.Environment
Zed: v0.138.0 (Zed Nightly b466a8b)
OS: macOS 14.5.0
Memory: 18 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.Zed.log
TailwindCSS LSP log
An additional log popped up (not sure when while trying to enter different classes)
The text was updated successfully, but these errors were encountered: