zed icon indicating copy to clipboard operation
zed copied to clipboard

TailwindCSS additional class details (style)

Open henrikruscon opened this issue 10 months ago • 5 comments

Check for existing issues

  • [X] Completed

Describe the feature

Would be very useful to have more details about the classes being suggested by autocomplete menu. It's very useful to be able to see at a glance what the class actually applies. For example compare the Zed result vs Nova below. Right now this space is only used for colors in Zed, why not everything else as well?

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

CleanShot 2024-04-14 at 22 13 42@2x CleanShot 2024-04-14 at 22 13 31@2x

henrikruscon avatar Apr 14 '24 20:04 henrikruscon

For a time it did work in hey some months ago. But now it's broken. Might look into the problem.

Edit: current main has this issue in the debug build when you have the autocomplete for tailwind classes image

Ar4ka avatar Apr 14 '24 22:04 Ar4ka

From what I can see in the RPC logs, it appears there's a variable namned documentation and it's used to populate that part that is missing, it seems to be lacking on most of the classes in the logs, except colors. And there it works.

CleanShot 2024-04-15 at 11 40 24@2x

Edit: Example from the log {"label":"shadow-ocean-light","kind":16,"documentation":"rgb(52, 152, 219)","sortText":"7856"}

henrikruscon avatar Apr 15 '24 09:04 henrikruscon

It'd also be useful to see color swatches for the tailwind color classes, like in Cursor/VSCode:

Zed

zed

Cursor

vscode

jasongitmail avatar May 07 '24 19:05 jasongitmail

So to be clear: the problem is that we only show the documentation for colors, but not for the other classes?

I think rendering the colors should be a separate issue.

mrnugget avatar May 15 '24 08:05 mrnugget

I think the main issue is that the documentation of a tailwind class is not displayed in Zed in the autocomplete panel like in vscode.

Zed: Screenshot 2024-05-15 at 10 44 54

vscode: Screenshot 2024-05-15 at 10 45 28

palmamartin avatar May 15 '24 08:05 palmamartin