.gitignore | ||
config.org | ||
init.el | ||
packages.el | ||
README.org |
Table of Contents TOC
Misc
Enable lexical binding, of course…
;;; -*- lexical-binding: t; -*-
(setq enable-dir-local-variables nil)
Appearance
Font
Doom exposes five (optional) variables for controlling fonts in Doom. Here are the three important ones:
doom-font
doom-variable-pitch-font
doom-big-font
– used fordoom-big-font-mode
; use this for presentations or streaming.
They all accept either a font-spec, font string (Input Mono-12
), or xlfd font
string. You generally only need these two:
(setq doom-font (font-spec :family "Fira Mono Medium" :size 12))
Theme
A list of all doom themes can be found here:
https://github.com/hlissner/emacs-doom-themes
(setq doom-theme 'doom-one)
Line numbers
Possible values of display-line-numbers-type
are nil
, t
, and 'relative
.
(setq display-line-numbers-type 'relative)
Programming
LSP
Doom disables documentation display in child frames by default; I like those, so re-enable them, and reset the defaults.
(after! lsp-ui
(setq lsp-ui-doc-max-width 150)
(setq lsp-ui-doc-max-height 30)
(setq lsp-ui-doc-enable t))
Rust
By default rustic-mode
uses rls
, I want to use rust-analyzer
instead.
(setq rustic-lsp-server 'rust-analyzer)
I don't want to enable format-on-save globally in Doom, but having it in rust is nice.
(after! rustic
(setq rustic-format-trigger 'on-save))
C/C++
Setup the default format for C/C++ editing.
(setq c-default-style "gnu")
(setq c-basic-offset 2)
Flycheck never works well for C / C++ without configuration or a CMake build system. Let's disable it.
(after! flycheck
(setq flycheck-global-modes '(not c-mode c++-mode)))
Org mode
Agenda setup
I want the default agenda view to be a daily view, with a log of what I've done during the day.
(after! org
(setq org-agenda-span 'day)
(setq org-agenda-start-with-log-mode t))
Journal
For org-journal I want weekly entries (the default is 'daily
).
(after! org-journal
(setq org-journal-file-type 'weekly))
Doom specific
Doom replaces the default tab behavior on headings, this restores the default one. Taken from here.
(after! evil-org
(remove-hook 'org-tab-first-hook #'+org-cycle-only-current-subtree-h))