░▒▓████████▓▒░▒▓██████████████▓▒░ ░▒▓██████▓▒░ ░▒▓██████▓▒░ ░▒▓███████▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓█▓▒░ ░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓███████▓▒░
- Use melpa only.
- Use emacs version 30.1.
- Use Maple Mono NF CN (NO Ligature!): repo, download.
- Use Plantuml for uml drawing: download.
- Use emacs build-in tree-sitter.
Ubuntu:
curl -sSL https://gist.githubusercontent.com/Jamie-Cui/e0c613bad06e17f34be591efb7615896/raw/00e86159e15191698f038d2be4367358f46fa66c/install-emacs-and-deps.sh | bash- gcc toolchain (gcc, g++, cmake, makefile, autotools, …): compile environment
- libgccjit: for emacs’s native compilation feature
- libsqlite3: for org-roam database
- libtree-sitter (tested with version 0.25.8, repo): for tree-sitter,
- (optional) texlive: for latex
- (optional) direnv: for separating project envs (
sudo dnf install direnv)
# macos, if you have not done so, in ~/.zshrc
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/homebrew/lib/
# why tree-sitter@0.25? see: https://github.com/jdtsmith/emacs-mac/issues/121
brew install autoconf texinfo libgccjit gcc gnutls tree-sitter@0.25 pkg-config coreutils# download
wget -c https://github.com/emacs-mirror/emacs/archive/refs/tags/emacs-30.1.tar.gz
# or the following dev branch with tty-child-frame feature
wget -c https://github.com/emacs-mirror/emacs/archive/refs/heads/scratch/tty-child-frames.zip
# unzip and enter emacs folder
./autogen.sh
# (alt) configure terminal emacs
./configure --with-native-compilation --with-tree-sitter --with-gnutls --without-x-toolkit --without-xpm --without-gif --without-tiff --with-sqlite3
# (alt) configure gui emacs
./configure --with-native-compilation --with-tree-sitter --with-sqlite3 --with-rsvg --without-x-toolkit
# compile
sudo make installMacOS: libgccjit failed to compile and run? see: d12frosted/homebrew-emacs-plus#680 (comment)
Have tree-sitter problem? see: link. Or download tree-sitter pre-built binaries here.
(defvar +emacs/repo-directory "~/Desktop/emacs.d")
(load (concat +emacs/repo-directory "/init.el"))- clangd, clang-format, clang-tidy
# ubuntu
sudo apt install clangd, clang-format, clang-tidy
# macos
brew install clangd, clang-format, clang-tidy- cpplint
pip3 install cpplint- cmake-format
pip3 install cmake-format- ctags, see: https://github.com/universal-ctags/ctags
git clone https://github.com/universal-ctags/ctags.git --depth=1
cd ctags
./autogen.sh
./configure --prefix=$HOME/.local
make
make installalias et='tmux attach -t emacs-session || tmux new -s emacs-session "emacs -nw"'sudo dnf install -y syncthing # fedora
brew install syncthing # macosFor ios, see: https://github.com/pixelspark/sushitrain?tab=readme-ov-file (WARNING: this app may not be avaliable in your country)
Start sync daemon at user level:
systemctl --user start syncthing.service
systemctl --user status syncthing.servicecurl -fsSL https://claude.ai/install.sh | bash
npm install -g @anthropic-ai/claude-code # deprecated
npm install -g @zed-industries/claude-code-acp