The Kalem Book GitHub

This Book describes Kalem's main branch, which may be ahead of the latest release.

Settings

Table of Contents

Settings in the Kalem menu (Ctrl+, or Cmd+,; in the terminal Alt+, where the terminal cannot send Ctrl+,; SPC h v with Vim's keys) lists every setting, in both editors the same way. Changes apply to every window and are saved in settings.toml in the settings directory: $KALEM_CONFIG_DIR, or kalem in $XDG_CONFIG_HOME, %APPDATA% on Windows, or ~/.config. A project can have its own .kalem/settings.toml, which applies over yours.

The settings are grouped by their table as in settings.toml, the way lazygit lists things: j and k (or the arrows) choose one, its default and what it does show below, h and l (or the left and right arrows, or Space) change it in place: a switch flipped, the next choice, a number up or down, and for a text the next of its usual values, so that little is typed: the fonts installed for the fonts, the TeX engines for latex.engine, search sites for search.online_url, LOGBOOK for org.log_into_drawer=… Enter types a value of your own (in the graphical editor in place, the usual values holding what is typed offered below it: Down chooses one, Tab completes), =/ filters by key or description, d takes a setting back to its default, e opens settings.toml, Escape goes back (or closes) and q closes. A click chooses a setting and a click on the chosen one changes it. Values that differ from the default stand out. A change is saved at once and shows at once; when the workspace's .kalem/settings.toml sets the same key, the status line says that it wins.

Enter on a list or a table shows its items in the same panel, so that no setting needs the file: in a list of choices (editor.vim.modes) Space puts a choice in or out; in a list of texts (org.todo_keywords, plugins.sources) Enter edits an item, a adds one, x removes it, and J and K move it down and up; in files.modes an entry is typed as path = mode and h and l step its mode. Escape goes back to the settings.

installed plugins, under plugins, lists the plugins installed; Enter on one shows its page: a language plugin's server (auto, one of those it offers, or off), the settings its manifest describes (see Plugins), changed the same way, any other key of its [plugins."ID"] table (typed as JSON), then updating it, its folder and removing it. Escape goes back a page at a time.

Commands that change a setting, such as Toggle Folder Tree or Toggle Line Numbers, save it too. After editing a settings file or keymap.json by hand, Reload Settings and Keys (help.reload, in the palette; SPC h r r with Vim's keys) reads them again in both editors.

The settings you are most likely to change; the Settings appendix of the Book's site lists every one, generated from the code (kalem book build makes it).

Setting Default What it does
ui.language "auto" auto (the system's), en or tr
editor.theme "system" system, light or dark
editor.font_family "" Body font; empty for the system font
editor.code_font_family "" Font of code and plain text
editor.font_size 16 Text size
editor.line_width 0 Width of the text column in characters, such as 80 (0: all)
editor.center_text false The text column in the middle of the window
editor.soft_wrap true Wrap long lines
editor.line_numbers true Line numbers in plain text and the source view
editor.inlay_hints true A language server's inlay hints in the text
editor.keymap_profile "word" word or vim
editor.vim.leader "space" The leader of the Vim keys (SPC p p)
editor.restore_session false On start without a file, the documents open at the last quit
ui.open_files "left" Open files on the left, at the top, hidden
ui.folder_tree false The project's folders and files below the open files
projects.auto_add false Folders under version control become projects by themselves
org.todo_keywords TODO, DONE TODO states of files without #+TODO; see below
files.show_hidden true Dot files in the file manager
plugins.sources [] Your plugin indexes, read first (Plugin Sources)
plugins.suggest true Say once that a plugin would serve a file you open
log.level "info" How much goes to the log

org.todo_keywords is a list such as ["TODO", "NEXT", "|", "DONE"]: the states after the bar are done states.

1. Themes

Light and dark themes follow the system unless editor.theme says otherwise; the terminal editor asks the terminal for its background. To change colors, write themes/light.toml or themes/dark.toml in the settings directory with a [colors] table of the colors to change, as #rrggbb or #rrggbbaa; the others keep their values:

[colors]
background = "#fdf6e3"
link = "#268bd2"

The built-in themes, with every color's name and what it colors, are crates/kalem-core/themes/light.toml and dark.toml in Kalem's source.