82 lines
1.7 KiB
Org Mode
82 lines
1.7 KiB
Org Mode
* 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:
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq doom-font (font-spec :family "Fira Mono Medium" :size 12))
|
|
#+END_SRC
|
|
|
|
** Theme
|
|
|
|
A list of all doom themes can be found here:
|
|
|
|
https://github.com/hlissner/emacs-doom-themes
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq doom-theme 'doom-one)
|
|
#+END_SRC
|
|
|
|
** Line numbers
|
|
|
|
Possible values of =display-line-numbers-type= are =nil=, =t=, and ='relative=.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq display-line-numbers-type 'relative)
|
|
#+END_SRC
|
|
|
|
* Programming
|
|
|
|
** LSP
|
|
|
|
Doom disables documentation display in child frames by default; I like those, so
|
|
re-enable them, and reset [[https://github.com/emacs-lsp/lsp-ui/blob/242dfe859c3497c456eaacfd84942e12419529fe/lsp-ui-doc.el#L84][the defaults]].
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(after! lsp-ui
|
|
(setq lsp-ui-doc-max-width 150)
|
|
(setq lsp-ui-doc-max-height 30)
|
|
(setq lsp-ui-doc-enable t))
|
|
#+END_SRC
|
|
|
|
** Rust
|
|
|
|
By default =rustic-mode= uses =rls=, I want to use =rust-analyzer= instead.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq rustic-lsp-server 'rust-analyzer)
|
|
#+END_SRC
|
|
|
|
I don't want to enable format-on-save globally in Doom, but having it in rust is
|
|
nice.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(after! rustic
|
|
(setq rustic-format-trigger 'on-save))
|
|
#+END_SRC
|
|
|
|
** C/C++
|
|
|
|
Setup the default format for C/C++ editing.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq c-default-style "gnu")
|
|
(setq c-basic-offset 2)
|
|
#+END_SRC
|
|
|
|
* Misc
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(setq enable-dir-local-variables nil)
|
|
#+END_SRC
|