brew install --cask emacs@nightlyThese are the most important keystrokes of all. If you know these keys keystrokes, you can get helpful information whenever you are stuck! These keystrokes are far more helpful than Google.
C-h(elp) b(indings)shows the keybindings available in the current buffer.C-h(elp) d(ocumentation)lets you search through all available documentation.C-h(elp) f(unction)displays the current list of available functions.C-h(elp) i(nfo)shows the info docs installed on your computer (no need to have a browser open just to read documentation).C-h(elp) m(ode)shows information about all the modes in the buffer.C-h(elp) k(ey)let’s you type a keystroke and find out what it does.C-h(elp) v(ariable)displays the list of available variables.
My approach to configuration is guided by a few core principles:
- Simplicity (KISS): Most systems work best when they are kept simple. This configuration avoids unnecessary complexity and doesn’t require a special mindset to use or modify. It’s a document first, not an automated deployment script.
- Locality: I believe that related settings should be close to each other. This entire setup is self-contained in one place to make it easy to understand and maintain without hidden dependencies or side effects.
- Predictability: My environment should behave consistently, and I want the ability to revert to a a previous state if something goes wrong. Versioning this repository with Git makes that possible.
- Declarativeness: I want to keep a record of the reasoning that led to my configuration choices. Literate programming helps me document these decisions for my future self and for anyone else who might find this useful.
This Emacs setup is designed to be a powerful and ergonomic environment for both writing and programming. Here are some of the highlights:
- Performance-orientated: The configuration is optimized for a fast startup, with garbage collection settings tuned to be less invasive during initialization.
- Ergonomic keybindings: Sensible, discoverable keybindings are
implemented using
general.elandwhich-keyto make interaction intuitive. - Modern aesthetics: It features a clean, minimalist UI with an
adaptive dark/light theme (
sanityinc-tomorrow), beautiful fonts with ligature support (Iosevka), and a functional mode line. - Efficient navigation: A powerful completion framework powered by
Helmprovides a consistent interface for finding files, switching buffers, and executing commands.
- LSP integration: It uses
eglotfor seamless Language Server Protocol support, providing intelligent code completion, diagnostics, and navigation across various languages. - Advanced code parsing: Leverages
tree-sitterfor fast and accurate syntax highlighting, code folding, and structural editing, which is more robust than traditional regex-based approaches. - Powerful completion: A rich auto-completion experience is provided
by
company-mode, complemented by fuzzy finding capabilities. - Git integration: Deep integration with Git is achieved through
Magit, the magical Git porcelain, along withgit-gutterto show changes in the fringe. - Language-specific support: Tailored setups for languages like Python, Clojure, Rust, and Shell scripting, including formatters, linters, and interactive REPL.
- Integrated shell emulator: Features
eat(Emacs Application Toolkit), a powerful terminal emulator that integrates seamlessly with the Emacs environment, allowing me to stay within a single application for most of my tasks. - REST client: Includes
restclient.elfor making HTTP requests directly from within Emacs, which is incredibly useful for API development and testing. - File management: Uses
Dirvishto provide a modern and highly customizable file manager experience within Emacs.
