tico Configuration
[ home | download | configuration | vintage | faq | mascot ]
Tico the Toucan tico editing hello.cxx, a C++ program, on a white CRT monitor

Tico reads up to three configuration files, in this order, each one able to override settings from the ones before it:

  1. a system-wide nanorc
  2. a user nanorc
  3. ~/.ticorc, tico's own config file

Command-line flags are applied last and win over anything in any of these files.

nanorc: the same file nano reads

Tico understands the same file format as GNU nano's nanorc, so an existing ~/.nanorc mostly works unchanged. The full list of what a set/unset line can name is below, in "Configuration items" — you shouldn't need nano's own nanorc(5) man page just to configure tico, though it's a reasonable deeper reference if you already know it. Tico looks for one system-wide file and one user file:

Both files, if present, are read every time tico starts. set/unset lines and bind/unbind lines are applied exactly as nano applies them.

nanorc also has a syntax block format for defining syntax highlighting (syntax, color, icolor, header, magic, include, extendsyntax, and the per-syntax formatter/linter/comment/ tabgives lines). Tico parses these — so a real-world nanorc full of them still loads without errors — but they have no effect: tico highlights with its own built-in, tree-sitter-based language table instead of nano's regex engine. See "Syntax highlighting and themes" below for how tico actually decides what to highlight and with which colors.

Two command-line flags change how nanorc is handled:

Configuration items

This is every name a set/unset line (in a nanorc) or a bare line (in ~/.ticorc's [main], see below) can use, grouped by what they affect. Most take no value — they're plain on/off toggles. A few take one, written set name value in a nanorc or name = value in ~/.ticorc.

A handful are recognized and stored but don't do anything in tico yet (no feature has been built for them). Those are marked (not yet implemented) below — flipping one won't error, it just won't change tico's behavior. Everything not marked that way works.

Editing behavior

Search & replace

Display

Files & safety

Colors

Twelve options each set the color of one piece of the interface. All share the same value syntax: [bold,][italic,]fgcolor[,bgcolor] — one or two color names (or hex, #rgb), optionally preceded by bold and/or italic. Color names are the eight ANSI names (black, red, green, yellow, blue, magenta, cyan, white), each optionally prefixed light for the bright variant, plus normal for the terminal's default, and — on a terminal with at least 256 colors — a set of named hues (pink, purple, mauve, lagoon, mint, lime, peach, orange, latte, rosy, beet, plum, sea, sky, slate, teal, sage, brown, ocher, sand, tawny, brick, crimson). Example: set titlecolor bold,white,blue.

~/.ticorc: tico's own config file

Tico adds one more file with no nano equivalent: ~/.ticorc (or $XDG_CONFIG_HOME/tico/ticorc, if that already exists). Its settings take precedence over anything set in a nanorc. It's an INI-style file with up to four sections.

[main]

The same options as "Configuration items" above, just written without the leading set/unset keyword — a bare optionname (or optionname = value) turns it on, and unset optionname turns it off:

[main]
linenumbers
tabstospaces
tabsize = 4
unset mouse

[keybindings]

Rebinds keys without nano's bind/unbind syntax. Each line is [menu.]key = function; menu defaults to main if omitted. A quoted value binds the key to that literal string (a macro) instead of a named function. key = unbind (or = none) removes a binding.

[keybindings]
^G = help
search.^Y = older
^D = "some literal text"
^K = unbind

[syntax]

Picks which color theme tico's syntax highlighter uses — nothing to do with nanorc's color/icolor directives, which tico ignores (see "Syntax highlighting and themes" below). theme = NAME sets the theme for every language; LANGUAGE.theme = NAME overrides it for one language only (language names as listed by --listsyntaxes):

[syntax]
theme = tico-builtin-gruvbox
perl.theme = tico-builtin-nord
fortran.theme = "~/my-themes/retro.toml"

[tico]

Settings with no nano equivalent at all. Currently just one:

[tico]
max_syntax_highlight_size = 8MB

Syntax highlighting and themes

This is the one area where tico deliberately does not behave like nano. nano highlights by matching regular expressions defined in nanorc syntax/color/icolor blocks. Tico instead ships its own built-in table of languages, each backed by a tree-sitter grammar, and detects a buffer's language from its filename, shebang, or a modeline — not from anything in a nanorc. There is currently no way to add highlighting for a language tico doesn't already know, short of adding a grammar to tico itself.

Colors, however, are configurable: they come from a theme file in Helix's theme format — plain TOML, keyed by scope names like keyword.control.import or constant.numeric. Only a theme's syntax-scope entries are used; a theme's ui.* entries (for things like the status bar or selection color) are ignored, since those follow nano's own set titlecolor and similar options instead.

Tico has nine themes built in, all named with a tico-builtin- prefix (reserved: a name starting with it is never looked for on disk, so it can't be shadowed by a same-named file elsewhere):

All eight non-default themes are vendored unmodified from Helix and use truecolor (#rrggbb), so they need a terminal that supports it.

Screenshots

Each built-in theme, highlighting the same sample of Rust code, with tico's default title bar and two-line help footer. Note tico-builtin-solarized_light's colors are calibrated for a light background, but tico takes the background itself from the terminal — that's the ui.*-is-ignored rule above in practice.

tico-builtin-default

tico-builtin-default theme highlighting a sample of Rust code

tico-builtin-gruvbox

tico-builtin-gruvbox theme highlighting a sample of Rust code

tico-builtin-catppuccin_mocha

tico-builtin-catppuccin_mocha theme highlighting a sample of Rust code

tico-builtin-dracula

tico-builtin-dracula theme highlighting a sample of Rust code

tico-builtin-nord

tico-builtin-nord theme highlighting a sample of Rust code

tico-builtin-tokyonight

tico-builtin-tokyonight theme highlighting a sample of Rust code

tico-builtin-onedark

tico-builtin-onedark theme highlighting a sample of Rust code

tico-builtin-monokai

tico-builtin-monokai theme highlighting a sample of Rust code

tico-builtin-solarized_light

tico-builtin-solarized_light theme highlighting a sample of Rust code

Any other name is looked up on disk, in order:

  1. $XDG_CONFIG_HOME/tico/themes/ (normally ~/.config/tico/themes/)
  2. $XDG_CONFIG_HOME/helix/themes/, then $HELIX_RUNTIME/themes/ if HELIX_RUNTIME is set
  3. wherever an installed Helix keeps its ~70 bundled themes (/usr/share/helix/runtime/themes and similar system paths)

so any theme already installed for Helix works for tico too, unmodified.

The theme is chosen with [syntax]'s theme/LANGUAGE.theme in ~/.ticorc (above), or overridden from the command line with --tico-theme NAME (global) or --tico-theme LANGUAGE.NAME (one language only) — either flag can be repeated. --tico-list-themes prints every built-in and on-disk theme it can find, along with a summary of which theme applies to what in the current configuration.

Precedence, summarized

Later wins over earlier:

  1. system nanorc
  2. user nanorc (~/.nanorc or equivalent — -f/--rcfile replaces both of the above with a single named file)
  3. ~/.ticorc
  4. command-line flags

-I/--ignorercfiles skips 1–3 entirely and runs on defaults plus whatever's on the command line.