Hi Ho Hi Ho it's back to Doom I go
It will surprise no-one (least of all me) that I am back in the arms of Doom Emacs again (not for the first time), after playing around for a while with a configuration built from scratch. It was a really fun experiment again, and I had a chance to play around with some of the packages that weren’t (at the time) included in Doom Emacs. Once again, I learned a bit more about configuring packages, and also thought about what features I really need. It is tempting with Doom to just enable all the things. That isn’t a bad approach exactly, but it does make it more difficult to figure out where there are conflicts and inevitably it can make things a bit slower.
Since I had been away from Doom, the packages I had been experimenting with have
been added to Doom, so I took the plunge and started with a new Doom config
file. I have come to really enjoy the completion package vertico, along with the
companion packages Marginalia, Consult, Orderless and Embark. Together, they
form a very sleek ecosystem of packages which inter-operate smoothly, and also
integrate well with Emacs’ built-in commands. Now if you enable :completion (vertico +icons)
in init.el
, most of the configuration work is already done for you.
I found that all I wanted to add was a snippet of configuration to install the
vertico-directory
extension, as follows:
(use-package! vertico-directory
:after vertico
:ensure nil
;; More convenient directory navigation commands
:bind (:map vertico-map
("RET" . vertico-directory-enter)
("DEL" . vertico-directory-delete-char)
("M-DEL" . vertico-directory-delete-word))
;; Tidy shadowed file names
:hook (rfn-eshadow-update-overlay . vertico-directory-tidy))
That saves a lot of frantic backspacing when you are finding a file that is in a
distant directory from where your current working directory. Other than that,
all I’ve done is add consult-outline
to the search
menu, as I use that quite
a lot to navigate org-mode headlines, and I like the formatting better than
consult-org-heading
. The outline command also works with Emacs Lisp source
files if you use comments starting with 4 semi-colon markers to stand for
top-level section headings.
Org-mode now has a new and nifty built-in citation format, which allows you to
format citations using the widespread CSL
formats. The package
citar operates very nicely with this system (and integrates with Vertico), and
now Doom includes a working setup for citar and the associated packages with the
biblio
module. I’m still having a little trouble with this at the moment:
inserting citations, exploring linked notes and PDFs all works fine, but
exporting an org-mode document hangs if you ask it to also print the
bibliography. Hopefully I will be able to figure out why this part isn’t working.
Working on my scratch Emacs configuration also showed me that I prefer to explicitly call some features. For example, I like using company to complete symbols, words and so on in the buffer, but I don’t like it popping up automatically after a delay (which is the default in Doom). It turns out that it is easy to fix with the following:
(after! company
(setq company-idle-delay nil))
Then you can all the popup when you need it with C-SPC.
Other than that, I haven’t had to add much configuration of my own. Henrik does a stunning job of taking care of all the rough edges and making sure that packages work together. It’s only when you try to build from scratch that you realise quite how much happens behind the scenes to make using Doom such a smooth and polished experience. I’ve been taking time to read through the package documentation so that I have a better idea what is going on under the covers (as it were), which also makes it easier to tweak things to your liking if necessary.