This is the config of a mostly-Vim user who occasionally uses Emacs, and mostly for Org.
When I do fire up Emacs, it tends to be Doom Emacs with its not-quite-Emacs-not-quite-Vim quirks.
init.el
The best use of init.el is just uncommenting entries from the extensive Doom init file for bundled packages you want enabled, and adding bundle options where relevant.
Again, grabbing a useful tip from the original
Move your cursor over a module’s name (or its flags) and press ‘K’ (or
‘C-c c k’ for non-vim users) to view its documentation. This works on
flags as well (those symbols that start with a plus).
Alternatively, press ‘gd’ (or ‘C-c c d’) on a module to browse its
directory (for easy access to its source code).
For the moment here’s the contents of my init.el. If you’ve wandered in from some search engine looking for setup hints, be aware that my package listing here may not be up to date with what you see in a brand new Doom config!
config.el
See the Doom config example for extremely helpful inline comments, which I have impatiently stripped from my own config.
However, I know I’ll need this bit:
Here are some additional functions/macros that could help you configure Doom:
load! for loading external *.el files relative to this one
use-package! for configuring packages
after! for running code after a package has loaded
add-load-path! for adding directories to the load-path, relative to
this file. Emacs searches the load-path when you load packages with
require or use-package.
map! for binding new keys
To get information about any of these functions/macros, move the cursor over
the highlighted symbol at press K (non-evil users must press C-c c k).
This will open documentation for it, including demos of how they are used.
You can also try gd (or C-c c d) to jump to their definition and see how
they are implemented.
This preface seems relevant when you have literate enabled in Doom.
Personal Variables
Some are preferences, some are handy ways to define my environment.
And some are for work projects that we don’t need to be showing the public.
Aesthetics
My personal favorite code font is FantasqueSansMono.
emacs-doom-themes includes many options, but I seem to have settled on Fairy Floss for my aesthetic.
Org mode
Honestly, Org mode is mostly what I use Emacs for.
Logseq does great as a sort of org-mode-light, and I highly recommend it if you want a less complex tool for managing notes and tasks. OTOH its org parser does not yet provide 100% of what I expect. I can’t quite abandon org mode yet.
Configure Org Mode
Tasks could be in notes, journal, or the actual agenda folder.
Sometimes I want to enable mixed-pitch-mode for Org, and sometimes I don’t. Eventually I’ll use some clever approach to toggle, but for now I just include this bit when I want it.
My org-directory is on a folder synchronized across multiple machines. Probably want to keep things like generated org-id values synchronized as well.
Make sure that tasks I think of on the spur of the moment in org/roam/daily get included in my Agenda views.
My brain insists on a particular set of state keywords for my tasks.
Throw all of it together, along with the things I don’t feel like explaining right now:
Fiddle with ox-hugo
Having trouble with ox-hugo. It fails telling me that there’s no function for backtraces. Hopefully this fixes it!
It sort of fixes it. I get a backtrace, but I also get my content exported. I’ll take it.
Company
An autocompletion framework of some kind? I’d like to tone it down, but first I’ll just figure out how to tune it. tecosaur’s notes seems like a good place to start.
Projectile provides one approach to project management in Emacs.
Doom Dashboard
Perl
Doom Emacs doesn’t do much with Perl. So I can’t just enable a handy init.el module. The handy module that was available didn’t actually do much, as it turns out.
For now let’s just use CPerl Mode with everything enabled and the IndentingPerl. When all else fails, go to the Emacs Wiki.
#+ name: configure perl settings
Python
Having a language server is nice, but I can’t just use the defaults.
For one thing, I prefer black’s 88 character default line length to Flake’s 79 character default.
For some strange reason I’m not getting any formatting applied when I save an obviously long line of Python. So I’ll borrow from a gist describing how someone set python-black up with Doom.
package.el
Just trying to get black formatting working with my Doom setup. +black seems to do nothing.
For general info about packages.el, I may want to look at the Doom packages example.