doom emacs has a command line interface that is still in early works (as of July 2022).
Search and replace across project
SPC s psearch
C-c C-eto open an editable buffer
Z Zto write and commit changes
Z Qto abort
Fix for vertico and doom doctor warning on lookahead for grep and ripgrep on macOS
doom doctor you may get:
! The installed ripgrep binary was not built with support for PCRE lookaheads. Some advanced consult filtering features will not work as a result, see the module readme. ! The 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.
For ripgrep, try installing ripgrep from brew again or:
brew uninstall ripgrep brew install rust cargo install --features pcre2 ripgrep
For grep, install grep from homebrew and then add it to PATH
brew install grep # In .zshrc/.bashrc if [ -d "$(brew --prefix)/opt/grep/libexec/gnubin" ]; then PATH="$(brew --prefix)/opt/grep/libexec/gnubin:$PATH" fi
Setup for integration with Github:
forge is a built in part of magit which allows you to interact with Github Issues and PRs. code-review is a library that allows you to comment and modify a PR review directly in emacs.
Both libraries require a personal access token to operate.
- Create a new personal access token with the scopes
user(these are the permissions necessary for forge). I used this token for both
forge. You could create a slightly less scoped token for
code-reviewbut that the difference is marginal.
~/.authinfo.gpgin emacs. Assuming you have gpg setup correctly, it will automatically encrypt/decrypt this file.
- Add the following line:
Replacing GITHUB_USERNAME with your username and PASSWORD with the token you just generated
machine api.github.com login GITHUB_USERNAME^forge password PASSWORD machine api.github.com login GITHUB_USERNAME^code-review password PASSWORD
- Save and close the file
- Navigate to the repo you want to operate on
- With default doom-emacs bindings, open the forge dispatch
SPC g '
ato add the repository
- Reinvoke the dispatch and run
f fto pull all pull requests and issues
While on a PR,
SPC g ' c r will open up a code-review session for that PR. Most commenting can be invoked with a
RET at proper places. Submit a PR by hitting
r and completing the menu as desired.