zed
zed copied to clipboard
Fix Tailwind completions in Rust
Closes #25670
After fixing:
Release Notes:
- Fixed broken Tailwind CSS auto completion in Rust.
We require contributors to sign our Contributor License Agreement, and we don't have @I-Info on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.
@cla-bot check
The cla-bot has been summoned, and re-checked this pull request!
This issue does not only impact Rust. Any chance this can be done for Ruby / ERB templates as well? Tailwind support just seems broken for weeks now
- https://github.com/zed-industries/zed/issues/27118
- https://github.com/zed-industries/zed/issues/27842
This issue does not only impact Rust. Any chance this can be done for Ruby / ERB templates as well? Tailwind support just seems broken for weeks now
I think this can be done much easier by modifying language configs of Ruby templates in the zed ruby extension
However, I am not familiar with Ruby templates or ERB at all, so I can't give an exact solution. I'm thinking maybe there'd be faster progress on this bug if someone opened a new issue or PR there?
Edited: I also tried to fix tailwind completions in Ruby
- zed-extensions/ruby#62
During the several days waiting for the review of this PR. I think it would quite tedious to add overrides for every language which Tailwind might be used in.
So, is it possible to set default query characters in Tailwind's (also any other languages') LspAdapter?
Hello, I confirm having the same issue, do you think you could merge as soon as practical ? And thanks for this wonderful editor, I've just upgraded to Pro today, I haven't even tried Cursor or Windsurf as I just relish the Zed experience.
Hey @I-Info, we don't currently have a way of having a child-parent relationship like you describe (i.e. tailwind -> Rust rather than the other way around), it's something I agree we should support, so that for example the Rust extension doesn't need to be concerned with every possible macro DSL.
Separately, I think this is better suited as a PR to https://github.com/zed-extensions/leptos as defining it in the rust language will have tailwind LSP run for all Rust projects, rather than just ones that are using rsx! like you are. If you're not using leptos, it's probably worth making an extension for whatever you're using based on the leptos extension and having this config there instead, so that the tailwind behavior is more opt-in.
For that reason, I'm going to close this for now, but I'm happy to re-open if given a reason why I'm misunderstanding or otherwise continue discussing. Thanks!