This guide will walk you through the prerequisites and installation steps to get your Emacs environment running perfectly.
To get the full experience, you need a modern version of Emacs and a few system-level dependencies.
- Emacs 30.0+ is highly recommended.
- Native compilation and Tree-sitter support are strongly recommended, especially if you want the Tree-sitter language remapping in the language modules.
- macOS Users: You can install this via Homebrew:
brew install emacs-plus@30 --with-native-comp --with-xwidgets
The current default bindings work without extra search binaries. If you want fast CLI search tools available for future workflows, install:
- ripgrep (
rg) - fd
# macOS brew install ripgrep fd
This configuration defaults to the Monaco font (size 130). Ensure it is installed on your system, or change the custom-set-faces value in init.el to your preferred monospace font (e.g., Fira Code, JetBrains Mono).
If you already have an Emacs configuration, back it up:
mv ~/.emacs.d ~/.emacs.d.bakClone this configuration into your home directory:
git clone https://github.com/suxiaogang223/kanso-emacs.git ~/.emacs.dStart Emacs. The configuration will:
- Initialize package archives from the Tsinghua (TUNA) mirrors.
- Install packages required immediately by startup.
- Schedule any remaining missing packages for installation after startup settles.
Troubleshooting Network Issues:
If the initial download fails due to a timeout, simply press M-x (Alt + x) and type:
M-x bootstrap-packages
This will forcefully refresh the package archives and attempt the installation again.
If you want to inspect package drift without changing anything, run:
M-x missing-selected-packages
If you prefer to bootstrap packages from the terminal, use:
make bootstrapAfter setup, you can verify the configuration from the command line:
make smoke
make testmake smokechecks thatinit.elloads successfully in batch mode.make testruns the ERT suite for stable config behavior.
Tree-sitter provides superior, AST-based syntax highlighting. You need to install the grammars for your specific languages.
Run the following commands interactively in Emacs:
M-x install-python-treesit-grammarM-x install-rust-treesit-grammarM-x install-c/c++-treesit-grammars
Note: You will need a C compiler (like gcc or clang) on your system to compile these grammars.