zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.95k stars 2.83k forks source link

Support for Tailwind (3.x) @apply syntax in .vue files + syntax highlighting for @apply in .css files #10448

Open FalkoJoseph opened 5 months ago

FalkoJoseph commented 5 months ago

Check for existing issues

Describe the feature

Added screenshots for clarity to describe these two issues.

1. Missing support for Tailwind (3.x) @apply syntax in .vue files is not supported:

Description: the CSS of a sample Single File Component in Vue. As you can see the @apply syntax is not supported:

Falko 2024-04-11 at 22 31 59@2x

Description: the error that Project Diagnostics returns, which is identical to above and confirms that it's not supported:

Falko 2024-04-11 at 22 32 25@2x

3. Syntax highlighting for Tailwind (3.x) in .css files is not supported:

Description: the CSS highlighting is broken in .css files when using Tailwind's @apply.

Falko 2024-04-11 at 22 33 29@2x

If applicable, add mockups / screenshots to help present your vision of the feature

No response

olrtg commented 5 months ago

For Vue, you should already have support adding lang="postcss" to your style tag. An for the other case, Zed doesn't have support yet for PostCSS files.

Hope it helps!

olrtg commented 5 months ago

Update: About Zed not supporting PostCSS, the CSS parser seems to have some basic support for PostCSS syntax, but in the Neovim ecosystem I see that they use the SCSS parser for that. So we may have better support when #5356 is fixed.