Skip to content

Configuration Reference

This document lists every configuration option in aretext.

Attribute Type Description
syntaxLanguage enum Language used for syntax highlighting. Must be a valid syntax language.
tabSize integer Maximum number of cells occupied by a tab. Must be greater than zero.
tabExpand boolean If true, replace inserted tabs with the equivalent number of spaces.
showTabs boolean If true, display tabs in the document.
showSpaces boolean If true, display spaces in the document.
autoIndent boolean If true, indent new lines to match indentation of the previous line.
showLineNumbers boolean If true, display line numbers.
lineNumberMode enum Control how line numbers are displayed. Either "absolute" or "relative" to the cursor.
lineWrap enum Control soft line wrapping behavior. Either "character" for breaking at any character boundary or "word" to break only at word boundaries.
menuCommands array of objects Additional menu items that can run arbitrary shell commands. See Menu Command Object below for the expected fields.
hideDirectories array of strings Glob patterns matching directories to hide from file search. Patterns are matched against the absolute path to the directory.
styles dict Styles control how UI elements are displayed. See Styles below for details.

Syntax Languages

Value Description
bash bash
c C
criticmarkup CriticMarkup
gitcommit Format for editing a git commit
gitrebase Format for git interactive rebase
go Go
gotemplate Go template
json JSON
makefile Makefile
markdown Markdown
p4 p4
plaintext Do not apply any syntax highlighting.
protobuf Protocol Buffers Version 3
python Python
rust Rust
todotxt todo.txt
xml xml
yaml YAML
Attribute Type Description
name string Displayed name of the menu item.
shellCmd string Shell command to execute when the menu item is selected.
mode enum Either "silent", "terminal", "insert", or "fileLocations". See Custom Menu Commands for more details.
save bool If true, attempt to save the document before executing the command.


The styles configuration is an object with keys:

  • lineNum: the line numbers displayed in the left margin of the document.
  • tokenOperator: an operator token recognized by the syntax language.
  • tokenKeyword: a keyword token recognized by the syntax language.
  • tokenNumber: a number token recognized by the syntax language.
  • tokenString: a string token recognized by the syntax language.
  • tokenComment: a comment token recognized by the syntax language.
  • tokenCustom1 through tokenCustom16: language-specific tokens recognized by the syntax language.

Each style object supports the following (optional) attributes:

Attribute Type Description
color string Foreground (text) color.
backgroundColor string Background color.
bold bool Set bold attribute.
italic bool Set italic attribute.
underline bool Set underline attribute.
strikethrough bool Set strikethrough attribute.

Colors can be either a W3C color keyword or a hexadecimal RGB code. For example, both red and #ff0000 represent the color red.

When using named colors, the terminal emulator may override the displayed color. For example, the solarized dark theme in Alacritty overrides the color red to a specific hex code. If you want to ignore the terminal emulator palette, specify colors using hexadecimal RGB codes instead of named colors.

Not all terminal emulators support every style attribute (bold, italic, etc.). If styles are displayed incorrectly, try changing the value of the $TERM environment variable. If you are using tmux, try set -g default-terminal "tmux".