A narrow side panel for jj, like a file explorer for your working-copy changes.
It shows:
- the current change id
- the current bookmark, if any
- the current description
- every file edited in the working copy (
jj st) - the parent change: short id and bookmark
Press <CR> on a file to open it in the main window, p to open it while
keeping focus in the panel, or d to pop up its jj diff in a float.
With the builtin vim.pack:
vim.pack.add({ "https://github.com/devjgm/jj-view.nvim" })
require("jj-view").setup()| Key | Where | Action |
|---|---|---|
<C-S-J> |
global | toggle the panel |
:JjView |
global | toggle the panel |
<CR> / o |
panel | open the file under the cursor |
p |
panel | open the file, keep focus here |
d |
panel | jj diff the file in a float |
R |
panel | refresh |
q |
panel | close |
<C-S-J> (Ctrl-Shift-J) needs a terminal that speaks the kitty keyboard
protocol (ghostty, kitty, wezterm). Otherwise use :JjView.
require("jj-view").setup({
width = 38, -- panel width
key = "<C-S-J>", -- toggle key
})- Neovim 0.10+
- the
jjbinary onPATH
The whole panel is colored. The file paths are underlined, which is the one
cue that those are the actionable lines (<CR> acts on them, not on the
context around them). Every highlight links to a standard group, so it follows
your colorscheme and can be overridden:
vim.api.nvim_set_hl(0, "JjViewFile", { link = "Directory" })Groups: JjViewTitle, JjViewLabel, JjViewChange, JjViewBookmark,
JjViewDesc, JjViewFile, JjViewHint, JjViewAdded, JjViewModified,
JjViewRemoved, JjViewRenamed. See :help jj-view-highlights.
The panel re-reads jj on open, R, :w, and when Neovim regains focus or you
step into the panel. Focus/enter re-reads use --ignore-working-copy so they
never snapshot the working copy, avoiding divergent operations when a jj is
running in another terminal. Under tmux, focus refresh needs
set -g focus-events on.
just test # headless nvim test suite (no external deps)
just fmt # stylua
just check # stylua --checkSee :help jj-view for the full docs.