New in hexiel 1.2 · free
Ask the language server.
Don’t grep and guess.
“Where is this defined? Who calls it? What type is it?” A language server answers those exactly,
including imports, inheritance and overloads that text search can’t follow. hexiel’s lsp tool
lets the model ask the server you already have installed and read one short answer instead of searching and opening files.
Exact, not approximate
Definitions and references come from the same engine your editor uses, so the model doesn’t chase look-alike names.
Fewer tokens
One line per location instead of whole files in context. Results are capped at 40 lines.
Nothing left running
Servers start on first use, stop after five idle minutes and are killed when hexiel exits.
What the model can ask
definition: where a symbol is defined.references: every place it is used.hover: its type and documentation.diagnostics: the server’s errors and warnings for a file.symbols: search the whole workspace by name.
The model gives a symbol name (and a line number if the name appears several times) instead of counting columns. If no server is installed for a file type, the tool replies with the install command and the model falls back to hexiel’s own symbol index (where_is, callers, outline).
Built-in servers
Install the ones you need; hexiel finds them on your PATH. hexiel --doctor lists the servers your project uses and which are missing.
| Server | Languages | Files | Install |
|---|---|---|---|
pyright | Python | .py .pyi | pipx install pyright |
typescript-language-server | TypeScript, JavaScript | .ts .tsx .js .jsx .mjs .cjs | npm i -g typescript typescript-language-server |
gopls | Go | .go | go install golang.org/x/tools/gopls@latest |
rust-analyzer | Rust | .rs | rustup component add rust-analyzer |
clangd | C, C++ | .c .h .cc .cpp .hpp | your package manager: clangd |
jdtls | Java | .java | brew install jdtls |
lua-language-server | Lua | .lua | brew install lua-language-server |
bash-language-server | Shell | .sh .bash | npm i -g bash-language-server |
ruby-lsp | Ruby | .rb | gem install ruby-lsp |
intelephense | PHP | .php | npm i -g intelephense |
We verified the full round trip against clangd and against a test server in our suite. The other entries use each server’s standard start command; if one needs different arguments on your machine, override it as below and tell us.
Installing a missing server
If you work in a language whose server isn’t installed, hexiel can install it for you. It never does so on its own.
- From the terminal:
hexiel --install-lsp pyright. With no name,hexiel --install-lsplists the servers your project needs and which are missing. - From a chat: the model calls
lsp_installonly when thelsptool reports a missing server and you want that language. hexiel shows the exact command first and waits for your yes. With no way to ask, it installs nothing. - hexiel uses the first package manager you already have (pipx, uv, npm, go, rustup, gem or brew), looks in the usual user install folders (
~/.local/bin,~/go/bin,~/.cargo/bin) so a fresh install works without editing PATH, and checks the server is really there afterwards. - Cancel stops the install. A failure shows the package manager’s last output. Where no package manager fits (clangd, for instance), you get the manual steps.
Recipes are the install_cmds field of each server in lsp.toml, so you can see and change exactly what runs.
Project files are not trusted by default. A server command in a cloned project’s .hexiel/lsp.toml is ignored until you run hexiel --trust-project there, because it names a program hexiel would run. Your own ~/.config/hexiel/lsp.toml always applies.
Add or change a server
Servers are declared once, by name: the command, the file types, and the files that mark a project root. Put them in ~/.config/hexiel/lsp.toml, or in .hexiel/lsp.toml inside a project (project entries win).
[server.zls]
command = ["zls"]
extensions = [".zig"]
root_markers = ["build.zig", ".git"]
install = "brew install zls"
[server.pyright] # change one field of a built-in
command = ["basedpyright-langserver", "--stdio"]
[server.jdtls]
disabled = true # turn a built-in off
Optional fields: language_id (what the server calls the language), env (a table of environment variables) and install_cmds (a list of commands to install it, tried in order, e.g. [["npm", "i", "-g", "zls"]]).
Where the idea comes from
Declaring each server once and finding the project root from marker files is the approach used by Helix and by Neovim’s nvim-lspconfig, and server install recipes are what Mason’s registry collects. hexiel borrows the idea, not their code: the registry, client and tool are written from scratch against the Language Server Protocol specification.
Questions
Does hexiel install language servers for me?
If you ask and approve. hexiel --install-lsp NAME or the model’s lsp_install shows the exact command and runs it only after your yes. hexiel --doctor lists what a project is missing.
Does it work with any language?
Any language with a server that speaks the Language Server Protocol over stdio. Add it in lsp.toml.
Will servers eat my memory?
One server per project root, started when first asked, stopped after five idle minutes and killed when hexiel exits.
Can the lsp tool change my code?
No. It only reads. Installing a server is a separate tool that always asks first. Rename support is planned and will show a preview first.