Find a file
2020-04-10 19:58:40 +02:00
.gitignore Initial commit 2020-04-10 17:42:01 +02:00
config.org Simpler Org experience 2020-04-10 19:58:40 +02:00
init.el Initial commit 2020-04-10 17:42:01 +02:00
packages.el Simpler Org experience 2020-04-10 19:58:40 +02:00
README.org Add README symlink for GitHub display 2020-04-10 17:42:01 +02:00

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 for doom-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)

Org mode

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))

Doom indents subtitles and their content by default, I prefer to leave them as is.

(after! org
  (setq org-startup-indented nil))