zed
zed copied to clipboard
Show inline previews for rgb hex color strings (LSP `textDocument/documentColor`)
Describe the feature
Show a color preview for languages like CSS and Tailwind.
VSCode has this, which it calls "color decorators":
JetBrains editors, such as PyCharm, take it one step further and provide a color wheel + picker that can be opened by clicking on the color preview. This allows you to change the color in a more human friendly way, while having the changes reflected in the source code in the original format.
I use a color highlight extension which enables different styles:
LSP can provide this via textDocument/documentColor.
This would be amazing. Is it in the roadmap?
That'd be amazing to have. I really use this feature when working with Tailwind
Really important feature for me
This is a very important feature for FE devs as we tend to work with colors. Would appreciate if this is added 👌
Was just looking for this myself! +1 on this!
Going to unify any "color preview" issues and point them at this issue.
There is precedent with inlay hints, but I think this is non-trivial to add due to needing to dive into the editor paint/render code.
Happy to support the final design of what previews look like if someone builds the feature and opens a PR.
Looking forward to this one. It's one of the very useful features I had in VSCode that I'm missing on Zed.
It would be useful if next to the line indicating the color you could see a preview of it, and if necessary also be able to modify it using a picker that is activated when you click on the color.
would also be very nice for it to be a per-language togglable feature.
Any update on this feature? Would be very nice to have this feature during FE development.
Would be a very nice feature!
need this feature in zed asap
There are quite a few people watching this topic. Please don't sent out emails/notifications to everyone just to say "me too!" when a simple thumbs-up on the top post would be sufficient.
Suggestion: I think these colors should show up in CSS and CSS-like languages, but not only that, things like hex colors or 0x notations of colors should show up in basically any language as well. You might want to have it be a setting as well! Someone mentioned something similar here already.
Also, a thin underline might work better with the style of zed, but that means it's harder to figure out what that color actually is at times.
I would absolutely love this feature!
I would absolutely love this feature!
Please just like the issue, instead of commenting on it. Comment ONLY if you have something to add to it. A few people not following basic common sense like this makes it worse for literally everyone else who wants to add to it.