erain@'s personal Emacs configuration. Heavily inspired by prelude. If you want an out-of-the-box config, use that — this one is forked so I can understand and control every piece.
- GNU Emacs 29.1 or newer (uses built-in
use-package,treesit,pixel-scroll-precision-mode,so-long, etc.). - For GUI Emacs, install a good programming font. YMacs prefers
JetBrains Mono (Ghostty-style/community-favorite choice), then Fira Code /
SF Mono / other popular coding fonts if available. Restart Emacs or run
M-x ymacs-setup-fontsafter installing a new font. Terminal Emacs inherits your terminal font (for example, Ghostty'sfont-family). - A Nerd Font for icons (GUI only). After first launch run
M-x nerd-icons-install-fonts. - Tree-sitter grammars are installed on demand by
treesit-auto; accept the prompt the first time you visit a file in a new language.
For a repeatable setup on another Mac, see docs/macos-setup.md:
git clone <this-repo-url> ~/.emacs.d
cd ~/.emacs.d
./scripts/setup-macos.shGUI-only packages (nerd-icons, beacon, pixel-scroll-precision-mode,
company-quickhelp, lsp-ui-doc child-frames) are auto-disabled when there's
no display, so emacs -nw is fully supported.
If you see a Gtk-WARNING ** cannot open display line on a headless host, that
comes from the GTK build of Emacs trying to initialize even with -nw. It's
harmless. To silence it install the X-less binary:
sudo apt install emacs-nox # Debian / UbuntuFor an emacsclient workflow run a daemon:
emacs --daemon # in your shell rc, or as a systemd user unit
emacsclient -t file.txt # open in the current terminal(server-start) in ymacs-core.el covers the case of starting Emacs
interactively first and then attaching with emacsclient later.
go install golang.org/x/tools/gopls@latest
go install golang.org/x/tools/cmd/goimports@latestpip install -U python-lsp-server[all] # `pylsp`Install ccls on PATH.
solcjs and solium are looked up at /usr/local/bin/. Override the paths in
modules/ymacs-programming.el if installed elsewhere.
YMacs uses gfm-mode for .md/.mdx, pretty prose layout, native fenced-code
fontification, optional spell checking, markdown-toc, and grip-mode for a
GitHub-accurate browser preview.
Recommended tools:
brew install pandoc marksman hunspell # preview/export, LSP, spell checking
pipx install grip # optional: C-c C-c g GitHub previewHunspell also needs dictionaries (*.aff/*.dic) under ~/Library/Spelling/
or /Library/Spelling/; this machine uses en_CA with en_US as a fallback.
Useful keys: C-c C-c l live preview, C-c C-c g Grip preview, C-c ' edit a
fenced code block, C-c C-c I toggle inline images.