Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Catenary loads configuration from multiple sources, in order of priority (last wins):

  1. Defaults: idle_timeout = 300, log_retention_days = 7.
  2. User config: ~/.config/catenary/config.toml.
  3. Project config: .catenary.toml in the current directory or any parent (searches upward).
  4. Explicit file: --config <path>.
  5. Environment variables: Prefixed with CATENARY_ (e.g., CATENARY_IDLE_TIMEOUT=600). Use __ for nested keys (e.g., CATENARY_ICONS__PRESET=nerd).

Language Servers

Configuration uses two sections: [server.*] defines how to run a language server, and [language.*] binds languages to servers.

[server.<name>]
command = "server-binary"
args = ["arg1", "arg2"]

[language.<language-id>]
servers = ["<name>"]

Example

idle_timeout = 300

[server.rust]
command = "rust-analyzer"

[server.rust.initialization_options]
check.command = "clippy"
cargo.features = "all"
diagnostics.disabled = ["inactive-code"]

[server.python]
command = "pyright-langserver"
args = ["--stdio"]

[server.python.settings.python]
pythonPath = "/usr/bin/python3"

[server.python.settings.python.analysis]
exclude = ["**/target", "**/node_modules"]
extraPaths = []

[server.tsserver]
command = "typescript-language-server"
args = ["--stdio"]

[server.gopls]
command = "gopls"

[language.rust]
servers = ["rust"]

[language.python]
servers = ["python"]

[language.typescript]
servers = ["tsserver"]

[language.go]
servers = ["gopls"]

Initialization Options

Server-specific options passed during the LSP initialize request. These go on the [server.*] entry:

[server.rust.initialization_options]
check.command = "clippy"
cargo.features = "all"

Refer to your language server’s documentation for available options.

Server Settings

Some language servers request configuration from the client via workspace/configuration. The settings table provides these values on the [server.*] entry. The TOML nesting mirrors the JSON object the server expects — Catenary matches the section path from each request and returns the corresponding subtree.

[server.python]
command = "pyright-langserver"
args = ["--stdio"]

[server.python.settings.python]
pythonPath = "/usr/bin/python3"

[server.python.settings.python.analysis]
exclude = ["**/target", "**/node_modules"]
extraPaths = []

When pyright sends workspace/configuration with { "items": [{ "section": "python.analysis" }] }, Catenary returns { "exclude": ["**/target", ...], "extraPaths": [] }.

Items with no matching path receive {}.

Language IDs

The [language.<language-id>] key in the language section must match the LSP language identifier. Catenary auto-detects languages from file extensions, filenames, and shebangs (#! lines in extensionless scripts). Any language with an LSP server works — this table covers what Catenary recognises automatically.

By extension

ExtensionLanguage ID
.rsrust
.gogo
.cc
.cpp, .cc, .cxx, .h, .hppcpp
.zigzig
.dd
.vv
.nimnim
.javajava
.kt, .ktskotlin
.scala, .scscala
.groovy, .gvygroovy
.clj, .cljs, .cljcclojure
.cscsharp
.fs, .fsx, .fsifsharp
.swiftswift
.m, .mmobjective-c
.pypython
.rbruby
.pl, .pmperl
.phpphp
.lualua
.tcltcl
.crcrystal
.js, .mjs, .cjsjavascript
.ts, .mts, .ctstypescript
.tsxtypescriptreact
.jsxjavascriptreact
.hs, .lhshaskell
.ml, .mliocaml
.elmelm
.gleamgleam
.ex, .exselixir
.erl, .hrlerlang
.purspurescript
.sh, .bash, .zsh, .ebuild, .eclass, .installshellscript
.fishfish
.ps1, .psm1, .psd1powershell
.r, .Rr
.jljulia
.mojomojo
.html, .htmhtml
.csscss
.scssscss
.sasssass
.lessless
.sveltesvelte
.vuevue
.json, .jsoncjson
.yaml, .ymlyaml
.tomltoml
.xml, .xsl, .xslt, .xsdxml
.sqlsql
.graphql, .gqlgraphql
.protoproto
.md, .mdxmarkdown
.rstrestructuredtext
.tex, .latexlatex
.typtypst
.nixnix
.tf, .tfvarsterraform
.cmakecmake
.dartdart
.dockerfiledockerfile

By filename

FilenameLanguage ID
Dockerfiledockerfile
Makefile, GNUmakefilemakefile
CMakeLists.txtcmake
Cargo.toml, Cargo.locktoml
Gemfile, Rakefileruby
Justfile, justfilejust
PKGBUILDshellscript

By shebang

For files without a recognised extension, Catenary reads the first line. If it starts with #!, the interpreter name is matched:

InterpreterLanguage ID
bash, sh, zsh, dash, kshshellscript
fishfish
python, python3, python2python
node, nodejsjavascript
denotypescript
ruby, irbruby
perlperl
phpphp
lua, luajitlua
tclsh, wishtcl
Rscriptr
juliajulia
elixir, iexelixir
erlerlang
swiftswift
kotlinkotlin
scalascala
groovygroovy
crystalcrystal

Global Options

OptionDefaultDescription
idle_timeout300Seconds before auto-closing idle documents. 0 to disable.
log_retention_days7Days to keep dead session data. 0 = remove on startup. -1 = retain forever.

Icons

The [icons] table controls icons in the TUI dashboard.

PresetDescription
unicode (default)Safe symbols for any terminal font.
nerdNerd Font glyphs (requires a patched font).
[icons]
preset = "nerd"