A Neovim User's Guide to Modern Emacs: Configuration, Packages, and Learning Resources
Diving into Emacs, especially coming from a highly configurable editor like Neovim, can feel like navigating a vast ocean without a map. Many users seek a "source of truth" for modern packages and best practices, aiming to fully own their configuration without unnecessary complexity. This guide distills community wisdom on where to begin and how to thrive in the Emacs ecosystem.
Choosing Your Starting Point: Vanilla vs. Starter Kits vs. Distributions
The central debate for new Emacs users often revolves around starting with a barebones setup or opting for a more opinionated one.
-
Vanilla Emacs: Many experienced users advocate starting with vanilla Emacs. This approach involves building your configuration piece by piece, adding packages only as you discover a need for them. The primary benefit is a deep understanding of how Emacs works, making debugging and customization transparent. It's akin to learning a language from its fundamentals.
-
Lightweight Starter Kits: For those who want sensible defaults without the full abstraction of a distribution, starter kits like Bedrock or minimal-emacs.d are highly recommended. These provide a well-curated set of initial configurations and packages, offering a pleasant experience while still allowing users to understand and control every line of their setup. Bedrock, for instance, focuses on fixing outdated defaults and includes a curated list of modern packages.
-
Distributions (Doom/Spacemacs): Emacs distributions like Doom Emacs and Spacemacs offer a "batteries-included" experience, particularly appealing to Vim users due to their pre-configured Evil mode (Vim keybindings). They are praised for feature discovery and a smoother transition from other editors. However, they can be seen as "magical" due to their extensive abstraction layers, potentially hindering a user's understanding of the underlying Emacs Lisp (Elisp) and making debugging more challenging. While they offer quick productivity, many suggest eventually migrating to a more personalized config.
Essential Modern Emacs Packages
To achieve a truly "modern" Emacs experience, several packages are consistently highlighted:
-
Completion Framework: This is often considered the most impactful upgrade. The recommended "standard completion stack" consists of:
- Vertico: For a vertical display of candidates in the minibuffer.
- Consult: Provides advanced search and navigation commands.
- Marginalia: Adds descriptive annotations to completion candidates.
- Orderless: For flexible, order-independent fuzzy matching.
- Embark: Offers context-aware actions for candidates.
- Corfu: Provides completion-at-point functionality, similar to what you might expect in an IDE.
These collectively replace older systems like Helm and Ivy.
-
Modal Editing: For Vim/Neovim users,
evil-modeis almost a prerequisite, providing Vim-like keybindings. An alternative,meow, offers a more customizable Kakoune/Helix-style modal editing experience. -
Git Integration:
Magitis universally lauded as the best Git interface available, often cited as a reason to use Emacs itself. -
Language Server Protocol (LSP): For IDE-like features,
eglot(built into recent Emacs versions) orlsp-modeare essential.lsp-modeis often preferred for its broader feature set and Data Access Protocol (DAP) support, whileeglotis simpler and tightly integrated. -
General Utilities: Other highly recommended packages include
use-packagefor declarative package management,which-keyfor keybinding discovery,helpfulfor enhanced documentation,avyfor quick cursor movement, andprojectilefor project management.Treesitter(built-in) also enhances syntax parsing.
Key Learning Resources
Navigating the Emacs world is made easier with these resources:
- Systemcrafters: Their "Emacs from Scratch" series is an excellent video resource for building a config from the ground up.
- Mastering Emacs: Mickey Petersen's blog and book provide comprehensive guides and explanations.
- Sacha Chua's Emacs News: A regular digest of Emacs-related news, articles, and packages.
- Prot (Protesilaos Stavrou): His blog and YouTube channel offer in-depth discussions and tutorials on various Emacs topics and configurations.
- xenodium.com: Another blog and video channel offering frequent Emacs content, including visual tweaks and macOS tips.
- Built-in Help System: Emacs's own
infomanual (C-h i), Elisp manual, and help commands (C-h ffor functions,C-h kfor keys,C-h wfor where-is) are unparalleled for introspection. - Community: The r/emacs subreddit, #emacs hashtag on the Fediverse, and the libera.chat #emacs IRC channel are active places for discussion and asking questions.
Ergonomics and Workflow
Emacs's classic keybindings can be a source of discomfort. Rebinding Caps Lock to Control is almost universally recommended to mitigate "Emacs pinky." While various OS-level methods exist for this, ergonomic keyboards can also help. Leveraging M-x (the command palette) for less frequent commands avoids complex key chords. It's also important to remember that Emacs is a Lisp environment; thinking of your init.el as a codebase you manage, rather than just a list of plugins, unlocks its true power. Emacs is designed for long uptime, so embrace it as an operating system within an operating system, rather than frequently starting and stopping it like a typical text editor.