doom Emacs has a command line interface that is still in early works (as of July 2022).
Search and replace across project
SPC s p
searchC-c C-e
to open an editable bufferZ Z
to write and commit changesZ Q
to abort
Fix for vertico and doom doctor warning on lookahead for grep and ripgrep on macOS
When running 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
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.
Authentication
Both libraries require a personal access token to operate.
-
Create a new personal access token with the scopes
read:org
,repo
,user
(these are the permissions necessary for forge). I used this token for bothcode-review
andforge
. You could create a slightly less scoped token forcode-review
but that the difference is marginal. -
open
~/.authinfo.gpg
in emacs. Assuming you have gpg setup correctly, it will automatically encrypt/decrypt this file. -
Add the following line:
machine api.github.com login GITHUB_USERNAME^forge password PASSWORD machine api.github.com login GITHUB_USERNAME^code-review password PASSWORD
Replacing GITHUBUSERNAME with your username and PASSWORD with the token you just generated
-
Save and close the file
Forge
- Navigate to the repo you want to operate on
- With default doom-emacs bindings, open the forge dispatch
SPC g '
a
to add the repository- Reinvoke the dispatch and run
f f
to pull all pull requests and issues
Code Review
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.