You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lightweight GNU Emacs 31.1 configuration focused on Rust
(eglot + rust-analyzer + tree-sitter) and Org-mode notes. It also
borrows several ideas from Neovim (telescope-style search, flash-style
jumps, surround-style editing).
The configuration is modular: each plugin lives in its own file under
~/.config/emacs/modules/. init.el loads them in order;
early-init.el sets up package mirrors, quickstart, and GC tuning.
For fast emacs --daemon startup, non-essential packages are deferred
(:defer 1 loads them 1s after idle) and the native-comp cache is warmed
in the background (see Notes).
Requirements
Run ./install-dependencies.sh to install the system packages, or
install them manually.
Jump points are recorded automatically before xref/consult/consult-eglot/avy/
org-roam/mark navigation commands, so C-c j b / C-c j f can navigate them.
Startup speed:emacs --daemon startup is kept fast by (1) deferring
non-essential packages — the completion stack (vertico / marginalia /
orderless / corfu / which-key) uses :defer 1 (loaded 1s after idle),
ox-gfm loads :after org, and the heavy ones (magit / org-roam /
vterm / org) are deferred; and (2) native compilation is kept
non-blocking: package-native-compile is nil (no compile during install),
native-comp-jit-compilation is t (async JIT: bytecode first, native code
compiled in the background), native-comp-async-report-warnings-errors is
nil (silent), and init.el pre-warms the cache via native-compile-async
over elpa/. early-init.el no longer nils out file-name-handler-alist
(that hack conflicted with native-comp). Note: the first run is still
slow mainly because ~30 packages are downloaded over the network, not
because of compilation.
Rust mode:.rs files open in the tree-sitter rust-ts-mode. The
rust-mode package is kept only for the cargo commands.
Dirvish extensions: dirvish installs its optional extensions
(dirvish-icons, dirvish-subtree, dirvish-collapse, dirvish-side, …)
under elpa/dirvish-<ver>/extensions/, which is not on the load-path by
default. dirvish-config.el adds it so that nerd-icons / subtree-state /
collapse attributes work (otherwise dirvish errors with
Cannot open load file dirvish-icons). For the same reason dirvish-side
is autoloaded explicitly (:bind would mis-autoload it from dirvish).
Dirvish layout:dirvish-default-layout is set to '(0 0 0.4), a clean
two-pane current dir | preview split. The upstream default
'(1 0.11 0.55) also opens parent-directory panes, which clutter the frame.
dirvish-use-header-line and dirvish-use-mode-line are both set to nil
because Dirvish draws those as extra windows (above/below the panes).
Dirvish sidebar size: the sidebar width is dirvish-side-width (integer
columns, default 35). Set it in dirvish-config.el to resize, e.g.
=#+begin_src emacs-lisp
(setq dirvish-side-width 30) ; narrower sidebar
Its position is controlled by dirvish-side-display-alist (default
((side . left) (slot . -1)); set side to right to flip it).
Dirvish image preview: previews (images, pdf, video thumbnails)
only appear in the full-frame layout (C-x d / M-x dirvish), which
has a dedicated preview pane. The sidebar (C-c d / dirvish-side) is a
plain tree view with no preview window. Image preview needs
vipsthumbnail (from libvips); video thumbnails need ffmpegthumbnailer.
Fonts: the icons need a Nerd Font (JetBrainsMono NF is used). If
icons look broken, run M-x nerd-icons-install-fonts.
Tree-sitter: grammars go in ~/.config/emacs/tree-sitter/ and are
found automatically through treesit-extra-load-path.