2. API available in init.clj

These functions are available in coxn.user. All of clojure.core is available, and the file also requires coxn.editor (alias ed, including defcommand), coxn.keymap (km), coxn.i18n, coxn.hooks, coxn.bus, coxn.config, and coxn.layers:

APIPurpose
(set-option! k v)Set an option, for example (set-option! :tab-width 4). All options appear below
(bind-key! "C-c g" 'find-file)Bind a global key
(unbind-key! "C-c g")Remove a global binding
(prefix-name! "C-c l" "lsp")Name a prefix for which-key
(set-theme! :doom-dark)Change the theme (see §10)
(set-face! :region {:bg "#3a3a5a"})Override one face; survives theme changes (see §10)
(register-theme! {...})Register your own theme (see §10)
(palette :space-dark) / (palette-with pal :keyword "#ff79c6")Read or adjust a built-in palette
(add-hook! :after-save-hook f) / (remove-hook! ...)Manage hooks; f takes and returns an editor (see §12)
(subscribe! :document-opened f) / (unsubscribe! ...)Subscribe to fact events; f receives [event payload] (see §12)
(configuration-layers! [:treemacs :lsp ...])Select layers; no call means all layers (see §9)
(set-language! :zh)Set the UI language (see §11)
(defcommand name "doc" [ed] ...)Define a command and register it in M-x

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