My personal Emacs settings with inspiration from:
This emacs.d makes Emacs into a highly productive editor for me. I try to
keep the following in mind when maintaining it:
- Let Emacs be Emacs. Don’t attempt to transform it into another editor.
- Keep the configuration as small as possible.
- Improve upon unusable default settings.
- Build the configuration from scratch. Avoid Emacs distributions such as syl20bnr/spacemacs, bbatsov/prelude or hlissner/doom-emacs. This is not a comment on the quality or purpose of such distributions, they’re just not for me.
- Keep the number of external packages to a minimum.
- Prefer packages that compose well with the rest of Emacs.
- Try to unify keybindings across similar modes (e.g.
oandC-oindiredandgrep). Keybindings can be notoriously inconsistent across modes. - Be vigilant in throwing away keybindings, packages or other configuration that remains unused for long periods.
- Don’t complicate
org-modetoo much. I useorgto manage much of my life and a minimum configuration exists to accomplish this.- Avoid additional
orgpackages asorgitself is more than big enough.
- Avoid additional
- Make code navigation quick and easy.
- Most non-trivial code repositories contain a high number of source files and navigating them efficiently is key to my productivity.
- Limit responsibilities. I.e. I have tried and failed to use Emacs for email and RSS.
eglot is enabled automatically for these modes:
go-modejava-modepython-moderuby-moderust-mode
Formatting on save is enabled by default for go-mode only. To enable this for
other modes, customize mpolden/inhibit-format-before-save.
To enable staticcheck when using the gopls language server, create a
.dir-locals.el file in project directory containing:
((go-mode
. ((eglot-workspace-configuration
. ((:gopls . ((staticcheck . t))))))))Only the latest stable Emacs version is supported. No guarantees for older versions.
Clone the repository:
git clone https://github.com/mpolden/emacs.dInstall symlink in ~/.emacs.d:
This will overwrite any existing file or symlink!
$ cd emacs.d
$ make installStart Emacs!
Local customizations can be added to lisp/init-local.el. This file is in
.gitignore.
Setting the variable mpolden/inhibited-features (e.g. in
lisp/init-local.el) allows inhibiting loading of one or more features,
i.e. files in lisp. Example:
(setopt mpolden/inhibited-features '(init-foo init-bar))