This is my private doom emacs configuration. Specifically configured for Javascript, Python, C++, Rust, and Go.
- Method 1: Use brew cask(Recommended)
brew tap railwaycat/emacsmacport brew cask install emacs-mac
- Method 2: Just brew, need compiling. (more customization)
brew tap railwaycat/emacsmacport rm -r /Applications/Emacs.app brew install emacs-mac --with-modules --with-natural-title-bar # create alias in /Applications ln -Fs `sudo find /usr/local/Cellar/emacs-mac -name "Emacs.app"` /Applications/Emacs.app
Notes: (just for method 2)
# Ubuntu
sudo add-apt-repository ppa:kelleyk/emacs
sudo apt-get update
sudo apt install emacs26
# Arch
sudo pacman -S emacs
# Clone Doom Eemacs
rm -r ~/.emacs.d
git clone https://github.com/hlissner/doom-emacs -b develop ~/.emacs.d
# Clone my config
git clone https://github.com/ztlevi/doom-config ~/.doom.d
~/.emacs.d/bin/doom install
This Emacs configuration is written for Emacs 25.1+ on Mac OS X 10.11+ and Linux Arch. Windows users may need to tweak the config for themselves.
Install dependencies including search tools, utils, and linters.
# search tool
brew install ripgrep grep exa zstd ctags fd
# utils
brew install sqlite hub gpg2 coreutils gnu-tar mplayer direnv libtool
# language
brew install shellcheck aspell languagetool clang-format
# Cask
brew cask install xquartz
sudo pacman --needed --noconfirm -S sqlite ripgrep fd wmctrl exa languagetool zstd ctags
Note: for windows users, aspell is used instead. ripgrep can be installed via choco
# Install linuxbrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
# Then follow the macos installaion guide except the Cask part
- For vterm
brew install cmake
sudo apt install libvterm-dev libtool-bin
npm install -g cspell prettier import-js
python3 -m pip install --upgrade pylint gnureadline black grip cpplint
# macos
brew install go
# arch
sudo pacman --needed --noconfirm -S go
Language Server Protocol: Install the lsp for your languages. A few examples are listed below.
# python
# for msplys M-x lsp-python-ms-update-server, and remove `lsp-python-ms` from `packages.el`->disable-packages!
# for pyls, anaconda pip fails on Arch Linux. I need to use system pip (/usr/bin/pip3) instead
pip3 install --user --upgrade 'python-language-server[all]' pyls-mypy pyls-isort
# Bash
npm i -g bash-language-server
# ccls: https://github.com/MaskRay/ccls/wiki/Getting-started
brew tap twlz0ne/homebrew-ccls
brew install ccls
# Rust
rustup update
rustup component add rls rust-analysis rust-src
# Javascript
npm i -g typescript
# Vue
npm install vue-language-server -g
# gopls
go get -u golang.org/x/tools/gopls
For MacOS, according to the discussion here, the following codes will speed up Emacs GUI startup time.
defaults write org.gnu.Emacs Emacs.ToolBar -string no
defaults write org.gnu.Emacs Emacs.ScrollBar -string no
defaults write org.gnu.Emacs Emacs.MenuBar -string no
An in-depth list of features, how to use them, and their dependencies.
How to configure this module, including common problems and how to address them.
- A list or table of public commands (and their keybinds) and functions that this module exposes.
- A brief description of how to use them
- Include a list of ways this module changes default behavior