PrStack

Configuration

How to configure PrStack for your repository

Configuration

PrStack can be configured using a .prstack/config.edn file in your repository root.

Configuration File

Create a .prstack/config.edn file in your repository:

Prop

Type

See the feature base command for more information about :feature-base-branches.

Configuring the Diff Viewer

The TUI allows you to view diffs between changes by pressing d on a selected change. By default, this uses your $EDITOR environment variable with a Neovim-specific command. You can customize this to use any diff viewer of your choice.

Configuration

The configuration file location is ~/.config/prstack/config.edn (note: this is in your home directory, not the repository).

Add a :diffview-cmd key with a template string that includes $from-sha and $to-sha placeholders:

{:diffview-cmd "your-command $from-sha $to-sha"}

The placeholders will be replaced with the actual commit SHAs when you trigger the diff viewer.

Examples

Neovim with DiffviewOpen (requires diffview.nvim):

{:diffview-cmd "nvim -c 'DiffviewOpen $from-sha..$to-sha'"}

Neovim with Difftastic (requires difftastic.nvim):

{:diffview-cmd "nvim -c 'Difft $from-sha..$to-sha'"}

Git's built-in difftool:

{:diffview-cmd "git difftool $from-sha..$to-sha"}

VS Code:

{:diffview-cmd "code --diff $from-sha $to-sha"}

Difftastic CLI (requires difftastic):

{:diffview-cmd "git diff $from-sha..$to-sha | difft --display side-by-side"}

GitHub CLI (opens diff in browser):

{:diffview-cmd "gh browse -- commit/$to-sha"}

Delta (requires delta):

{:diffview-cmd "git diff $from-sha..$to-sha | delta"}

Lazygit:

{:diffview-cmd "lazygit -f $from-sha..$to-sha"}

Default Behavior

If no configuration is provided, PRStack defaults to $EDITOR -c "Difft $from-sha..$to-sha", which assumes a Neovim setup with the Difft command available.

Example Configuration

Here's a complete example configuration file:

{:vcs :jujutsu ;; default
 :ignored-branches #{"deploy" "experimental" "temp-*" "wip-*"}
 :feature-base-branches #{"feature-redesign" "experimental-api" "feature-base-*}}

On this page