How to Install Doom Emacs on macOS in 2023

10 minute read

Operating System

macOS Monterey 12.6

Install Emacs

$ brew tap d12frosted/emacs-plus
$ brew install emacs-plus@28 —with-native-comp
$ ln -s /usr/local/opt/emacs-plus/Emacs.app /Applications/Emacs.app

The –with-native-compilation configuration option adds support for compiling EmacsLisp to native code, providing a noticeable performance improvement out-of-the-box. Third-party packages are also compiled to achieve further performance improvements.

Install Doom dependencies:

$ brew install git ripgrep
$ brew install coreutils fd
$ xcode-selected —install

Install Doom

$ git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
$ ~/.config/emacs/bin/doom install

Add Doom directory to PATH in your ~/.zsh(bash)rc file

export PATH="$HOME/.config/emacs/bin:$PATH"

Run doom doctor

$ doom doctor

Fix doom doctor warnings

Issue 1: This installed grep binary was not built with support for PCRE lookaheads. Some advanced consult filtering features will not work as a result, see the module readme.

$ brew install grep
# Add the following to .zshrc/.bashrc/
*if* [ -d “*$(*brew —prefix*)*/opt/grep/libexec/gnubin” ]; *then*
    PATH=“*$(*brew —prefix*)*/opt/grep/libexec/gnubin:$PATH”
*fi*

Issue 2: Couldn’t find shellcheck. Shell script linting will not work

$ brew install shellcheck

Issue 3: Couldn't find a markdown compiler, `markdown-preview' won't work

$ npm install -g marked

Run Doom Emacs!

$ emacs

or open: /Applications/Emacs.app

Credit to: