1. Configuration file and loading

The configuration file is init.clj (Clojure code, not EDN). Its location is:

PlatformPath
Linux / FreeBSD~/.config/coxn/init.clj, or $XDG_CONFIG_HOME/coxn/init.clj when $XDG_CONFIG_HOME is set
Windows%APPDATA%/coxn/init.clj
Any platformThe file named by $COXN_INIT takes precedence

In the editor, press M-m f e d (coxswain-find-dotfile) to open it.

Key points:

  • init.clj is loaded in the coxn.user namespace, before editor state is created. Calls such as set-option! and bind-key! are queued and applied once state exists. The file may also contain arbitrary Clojure code.
  • Option precedence is: user set-option! > layer default > core default (coxn.editor/opt).
  • A configuration error does not prevent startup. The error is shown in the echo area (Error in …/init.clj: …).
  • At runtime, M-: (eval-expression) evaluates in the same coxn.user environment. *ed* is bound to the current editor state; calls such as set-option! take effect immediately.

Raw Markdown: coxn manual (Markdown) · Installers: coxn product page