Skip to content

LSP server for highlighting colors in source files

License

Notifications You must be signed in to change notification settings

skewb1k/chroma-ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Packaging

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" ]

About

LSP server for highlighting colors in source files

Resources

License

Stars

Watchers

Forks

Languages