A language server for CEL (Common Expression Language).
It operates on individual .cel files, providing various LSP features.
$ go install github.com/stefanvanburen/cells/cmd/cells@latest- Semantic highlighting
- Diagnostics
- Formatting
- Hover
- References
- Completion
- Signature help
- Variable renaming
- Inlay hints (expression evaluation)
In addition to operating as a language server, cells provides CLI commands for use outside an editor.
Format CEL source files. With no arguments, reads from stdin and writes to stdout.
$ echo "1+2" | cells format 1 + 2 $ cells format file.cel $ cells format --write file.cel $ cells format --diff file.cel $ cells format --diff --write file.cel
Check CEL source files for parse and type errors.
Prints file:line:col: error: message for each diagnostic and exits 1 if any are found.
$ cells check file.cel $ cells check *.cel
Show documentation for the element at a given position (file:line:col, 1-indexed).
$ cells hover file.cel:1:7List all references to the identifier at a given position.
Each reference is printed as file:line:col.
$ cells references file.cel:1:1Rename the identifier at a given position.
Without --write, prints the updated content to stdout.
$ cells rename --new-name=newVar file.cel:1:1 $ cells rename --new-name=newVar --write file.cel:1:1
Add to your config (e.g. ~/.config/nvim/init.lua):
vim.lsp.config("cells", { filetypes = { "cel" }, cmd = { "cells", "serve" }, }) vim.lsp.enable("cells")
Neovim recognizes .cel files by default as of 0.12.
To verify it's working, open a .cel file and run :checkhealth lsp or :LspInfo.