3. Core options

Core defaults live in coxn.editor/default-options. Set every option with (set-option! key value).

3.1 Editing and indentation

OptionDefaultMeaning
:tab-width8Display width of a Tab character, following Emacs. EditorConfig tab_width and file-local values can override it per buffer
:indent-offset4Spaces per indentation level. Major modes may provide defaults (Clojure and Lisp modes use 2); EditorConfig / file-local values can override per buffer
:fill-column70Line width for M-q (fill-paragraph) and auto-fill (Emacs default: 70)
:electric-pairfalseAutomatically complete parentheses and quotes (M-x electric-pair-mode; Emacs default: off)
:show-parentrueHighlight matching parentheses (show-paren-mode; default on since Emacs 28)
:line-move-visualtrueC-n / C-p move by screen lines when long lines wrap (Emacs default)
:scroll-margin0Scroll margin (corresponds to Emacs scroll-margin; not consumed in the current release)

3.2 Interface and display

OptionDefaultMeaning
:display-line-numbersfalseLine numbers. M-x display-line-numbers-mode for the current buffer or global-display-line-numbers-mode globally
:mousetrueTerminal mouse (xterm-mouse-mode). While enabled, Shift+drag remains the terminal's own selection; M-x xterm-mouse-mode toggles it
:extended-keystruekitty keyboard protocol / modifyOtherKeys, so the terminal can send C-;, C-?, C-S-a, and similar combinations
:which-key-delay-ms500Delay after pressing a prefix before the which-key popup appears
:tab-bar-modefalseTop tab bar (M-x tab-bar-mode)
:minibuffer-display:bottomMinibuffer position for M-x, C-x C-f, and similar commands: :bottom gives a bottom helm-style display (spacemacs feel); :popup gives a centered floating frame (vertico-posframe feel)
:eldoc-display:echoWhere automatic function hints appear: :echo uses the bottom line; :popup opens a floating frame. Toggle with M-m t E; the explicit viewer on M-m h g ignores this option
:color-depth:autoColor depth: :auto probes the terminal (COLORTERM, TERM, Windows Terminal); 24 forces true color; 8 forces the 256-color palette chosen for each theme
:text-scale1.0Text scale (Emacs text-scale-mode): C-x C-+ / C-x C-= enlarge, C-x C-- shrinks, C-x C-0 resets; each step is ×1.2 and the range is 0.2–8.0. C-u 3 C-x C-+ applies three steps. GUI recalculates rows and columns with the new font size; in TUI, font size belongs to the terminal. Unlike Emacs, this setting is global

3.3 Completion

OptionDefaultMeaning
:completion-autotrueOpen completion automatically after typing pauses (corfu feel). Toggle with M-m t a
:completion-auto-delay-ms150Pause duration before automatic completion opens
:completion-auto-prefix2Minimum symbol characters before automatic completion opens. Trigger characters such as ., ->, and :: are exempt
:completion-sync-wait-ms300Initial synchronous wait after a completion request. If all sources return in time, show results immediately; otherwise switch to asynchronous display (bounded by :lsp-timeout-ms)

3.4 Files, auto-saving, and persistence

OptionDefaultMeaning
:auto-reverttrueIf an unchanged buffer's file changes externally, read it again
:auto-savetrueSave a copy of modified buffers (the original file is untouched)
:auto-save-interval300Number of keystrokes between auto-saves
:auto-save-timeout-ms30000Idle time in milliseconds before an auto-save
:auto-save-dir<cache>/auto-saveAuto-save directory; file names follow Emacs encoding (/#encoded-path#)
:make-backup-filestrueBefore the first save in a session, copy the original file to a backup
:backup-dir<cache>/backupBackup directory (file names are encoded-path~)
:save-placetrueRemember point and window position per file and restore it on reopening
:save-place-file<config>/save-place.ednStorage file for save-place
:bookmark-file<config>/bookmarks.ednBookmarks (C-x r m / C-x r b)
:projects-file<config>/projects.ednKnown projects, used by M-x project-forget-project and related commands

<config> and <cache> are described in §15.

3.5 GUI fonts (coxn-gui only; ignored by TUI)

The defaults are all nil, meaning follow the system: use the system monospace font as the primary font, and use system fontconfig fallbacks for CJK, symbols, and emoji. CJK uses a monospace sans font to preserve double-width alignment. Override with a priority list; the first installed font wins (following spacemacs my-fonts.el):

OptionDefaultMeaning
:gui-fontnilPrimary font, for example ["JetBrains Mono" "Fira Code"]
:gui-font-sizenil (= 14)Font size in sp (about pixels on desktop; follows Emacs :size), for example 14
:gui-font-cjknilFull-width / CJK font, for example ["Noto Sans Mono CJK SC"]
:gui-font-symbolnilArrow / symbol font, for example ["Symbola"]
:gui-font-emojinilColor emoji font, for example ["Noto Color Emoji"]

3.6 Search and process output

OptionDefaultMeaning
:grep-programnilProgram for project grep ("rg" / "grep"). nil uses rg when installed, otherwise grep
:repos-scannilRoot scanned by magit-repos-view (C-x p G). nil uses the parent of the current project root, otherwise the working directory
:repl-buffer-maximum-size1000000Maximum characters retained in REPL / process-output buffers (following comint-buffer-maximum-size); beyond it, trim from the start to a line boundary. 0 means unlimited

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