This is Jamie's private doom emacs config. Please make sure you are using zsh shell (recommende to use omz)! Pesonally, I use this config to do daily-cpp-dev, paper-writing, and paper related note-taking, so as a summary, this config
- Supports remote cpp developing with tramp, with correctly configured code-format (clang-format), lsp (eglot + clangd), bazel
- Supports latex acadamic paper writing, and note taking
WARNING: This config is only designed for MacOS.
Thirdparty libraries:
- wondershaper: Command-line utility for limiting an adapter's bandwidth
- secretflow/devtools: Secretflow's development tools
Recommended MacOS Apps:
- skim: open-source PDF reader and note-taker for OS X
- alacritty: cross-platform OpenGL terminal emulator
- zotero: free and easy-to-use biblography tool
- MacTex: standard distribution of TeX, LaTeX, and related programs produced by TeX Users Groups across the world
Of course, you need to download Emacs and doom first. As in doom's getting started guide says,
emacs-mac offers good integration with macOS, native emojis and better childframe support.
So, do the following steps. First, install presiquites with Homebrew.
xcode-select --install
# for emacs
brew install git ripgrep coreutils fd libtool fontconfig ripgrep pngpaste
# for cpp development (optional)
brew install clang-format bazelisk cmake ninja
Then, install emacs-mac,
brew tap railwaycat/emacsmacport
brew install emacs-mac --with-modules --with-native-comp
ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app
# open emacs
open -a "emacs" # you can also setup this as quick open script in alfred
git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
~/.config/emacs/bin/doom install
./${PROJECT_ROOT}/scripts/setup-bin.el
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install leetcode-cli
sudo ln -s /Library/TeX/texbin/latex /usr/local/bin
Tex preview not working, emacs can not find 'latex' and 'dvipng' binaries.
sudo ln -s /Library/TeX/texbin/latex /usr/local/bin
sudo ln -s /Library/TeX/texbin/dvipng /usr/local/bin
How to increase key repeating delay and key repeating rate on MacOS?
see: https://apple.stackexchange.com/a/83923, remember to restart your system in order for the configs to take effect.
defaults write -g InitialKeyRepeat -int 10
defaults write -g KeyRepeat -int 1
# or, config those values though GUI
open ~/Library/Preferences/.GlobalPreferences.plist