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

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.

ServerLanguagesFilesInstall
pyrightPython.py .pyipipx install pyright
typescript-language-serverTypeScript, JavaScript.ts .tsx .js .jsx .mjs .cjsnpm i -g typescript typescript-language-server
goplsGo.gogo install golang.org/x/tools/gopls@latest
rust-analyzerRust.rsrustup component add rust-analyzer
clangdC, C++.c .h .cc .cpp .hppyour package manager: clangd
jdtlsJava.javabrew install jdtls
lua-language-serverLua.luabrew install lua-language-server
bash-language-serverShell.sh .bashnpm i -g bash-language-server
ruby-lspRuby.rbgem install ruby-lsp
intelephensePHP.phpnpm 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.

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.

Give the model answers, not search results.