chroma-ls

Crates.iochroma-ls
lib.rschroma-ls
version0.2.1
created_at2025-10-23 03:45:15.579797+00
updated_at2025-10-30 01:24:36.884114+00
descriptionLSP server for highlighting colors in source files
homepage
repositoryhttps://github.com/skewb1k/chroma-ls
max_upload_size
id1896578
size43,312
(skewb1k)

documentation

README

chroma-ls

Preview

Tiny LSP server for highlighting color literals in source files. It implements only the textDocument/documentColor method. Designed for simplicity and performance - re-parses minimally and efficiently handles incremental document updates.

Installation

Using cargo

cargo install chroma-ls

Editor Configuration

Neovim

Create lsp/chroma_ls.lua:

---@type vim.lsp.Config
return {
  cmd = { "chroma-ls" }
}

With no filetypes provided, it will be active in all buffers.

Enable the LSP:

vim.lsp.enable("chroma_ls")

Helix

In languages.toml:

[language-server.chroma-ls]
command = "chroma-ls"

Helix does not currently support assigning an LSP globally to all filetypes. You need to specify the languages explicitly. For example:

[[language]]
name = "json"
language-servers = [ "chroma-ls" ]
Commit count: 0

cargo fmt