Skip to content

Commit

Permalink
astro: Fix Tailwind LS not working in attributes (zed-industries#12741)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mrnugget authored Jun 6, 2024
1 parent 2f05778 commit c354793
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions extensions/astro/languages/astro/overrides.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
(attribute_value)
(quoted_attribute_value)
] @string

(comment) @comment

0 comments on commit c354793

Please sign in to comment.