Language servers

The twenty-one servers Sirio knows, the fifteen it can fetch for you, and how to name your own.

Go to definition, find references, the outline and the error markers all come from a language server: a separate program that understands your project. Sirio knows which one each language uses, runs what is on your PATH, and can fetch most of them itself.

A server starts the first time you open a file that wants one and lives until Sirio quits, so navigation stays instant after the first index. Sirio leaves a crashed server down until you restart Sirio, because one that crashes on a file will crash again when it starts again, and on a large project that means re-indexing forever.

Twenty-one servers

rust-analyzer for Rust, typescript-language-server for TypeScript and JavaScript, pyright-langserver for Python, gopls for Go, clangd for C and C++, jdtls for Java, kotlin-language-server, sourcekit-lsp for Swift, ruby-lsp, intelephense for PHP, lua-language-server, zls for Zig, yaml-language-server, taplo for TOML, marksman for Markdown, lemminx for XML, sqls for SQL, bash-language-server, and the JSON, HTML and CSS servers that share one npm package.

Sirio fetches fifteen of them

Open a file whose server is missing and a card over the file says the server is not on your PATH, with a button to go and get it. The button names the download size when Sirio knows it. One click fetches the server and starts it, and the actions appear without reopening anything.

Seven servers ship as a release download: rust-analyzer, clangd, lua-language-server, taplo, marksman, lemminx and sqls. Sirio checks each one against a hash compiled into the app before it unpacks it. The other eight come from npm, each at a version compiled into the app. They need npm on your PATH, and without it the card says the server needs Node. It is the same installer that handles coding agents, and the servers it fetches live in their own store beside the agents.

Sirio makes the offer once per language in each session, and “Don’t ask again” stops it for good, across restarts.

The six it cannot fetch say why

jdtls needs a JVM, Java 21 or newer, and kotlin-language-server a JVM 17 or newer. gopls needs Go, ruby-lsp needs Ruby, and sourcekit-lsp arrives with a Swift toolchain rather than on its own. Sirio names the thing that has to come first, and Settings → Language Servers links to its instructions.

zls is the one that is Sirio’s fault rather than yours: the zls project publishes it only as .tar.xz, a format Sirio cannot unpack yet.

Your PATH wins

A server you already have installed is the one that runs. Sirio looks at your PATH first and only then at what it fetched itself, so a version you chose on purpose keeps running after you install one through the app.

Naming your own

~/.config/sirio/languages.toml holds your entries. When you set $XDG_CONFIG_HOME, Sirio reads $XDG_CONFIG_HOME/sirio/languages.toml instead, and $SIRIO_CONFIG_DIR/languages.toml wins over both when you set that variable. Sirio reads them before the built-in table, so overriding one takes a few lines and no hunting. Adding an entry for a file extension the table already covers replaces it; adding one for an extension it does not covers a language Sirio does not know.

Each time you open a file, Sirio checks whether languages.toml changed and reads it again if it did, so a new entry takes effect on the next file you open in a project where Sirio has not yet started that language’s server. A server that already runs in the project, or failed to start there, stays as it is until you restart Sirio. A file with a syntax error leaves the previous table in place and says what is wrong, with the line number when the parser has one.

Settings → Language Servers

All twenty-one in one list, each saying whether it is on your PATH, installed by Sirio (with its version), or absent. An absent server has its action next to it: Install for one Sirio can fetch, or Install guide, with what has to come first, for one it cannot. It is also where a declined offer comes back: a language you said no to reads “Install offers off”, and Offer again turns the offer back on.