Skip to content

special-k-anon/zed-color-preview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed Color Preview Extension

A work-in-progress extension for the Zed editor that aims to provide inline color previews for color values in supported file types.

Planned Features

  • Inline color previews next to color values in:
    • CSS/SCSS files
    • HTML files
    • JavaScript/TypeScript files
    • Any other file types that contain color values
  • Support for various color formats:
    • Hex colors (e.g., #ff0000, #f00)
    • RGB/RGBA (e.g., rgb(255, 0, 0), rgba(255, 0, 0, 0.5))
    • HSL/HSLA (e.g., hsl(0, 100%, 50%), hsla(0, 100%, 50%, 0.5))
    • Named colors (e.g., red, blue, transparent)

Current Status

This extension is currently in a pre-alpha state. While the basic structure is in place, it cannot yet provide inline color previews because the necessary APIs are not yet available in the Zed extension API.

What Works

  • Basic extension structure and registration
  • Color detection logic (not currently used)
  • LSP completion handling for color values (when provided by language servers)

What's Missing

The following features require APIs that are not yet available in the Zed extension API:

  • Access to editor buffer content
  • Ability to add inline decorations/previews
  • Buffer change event registration
  • Color preview rendering

Development Status

This extension is waiting for the following APIs to be added to the Zed extension API:

  1. Buffer access and manipulation
  2. Inline decoration support
  3. Buffer change event system

Once these APIs are available, the extension will be updated to provide the planned functionality.

Contributing

If you're interested in helping with this extension:

  1. Watch the Zed GitHub repository for updates to the extension API
  2. Consider contributing to Zed by implementing the necessary APIs for buffer decorations
  3. Help improve the color detection logic in the meantime

License

This project is open source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published