feat(neojj): add neojj (jujutsu) integration
Problem: diffs.nvim has no support for neojj, the neogit-like TUI for jujutsu VCS. Users switching to jj get no syntax highlighting in neojj status/diff buffers. Solution: Mirror the existing neogit integration pattern for neojj. Register `NeojjStatus`, `NeojjCommitView`, `NeojjDiffView` filetypes, set `vim.b.neojj_disable_hunk_highlight` on attach, listen for `User NeojjDiffLoaded` events, and detect jj repo root via `neojj.lib.jj.repo.worktree_root`. Add parser patterns for neojj's `added`, `updated`, `changed`, and `unmerged` filename labels.
This commit is contained in:
parent
de04381298
commit
5da3929480
5 changed files with 265 additions and 6 deletions
|
|
@ -40,6 +40,7 @@ CONTENTS *diffs-contents*
|
|||
7. Integrations ..................................... |diffs-integrations|
|
||||
Fugitive .......................................... |diffs-fugitive|
|
||||
Neogit .............................................. |diffs-neogit|
|
||||
Neojj ............................................... |diffs-neojj|
|
||||
Gitsigns .......................................... |diffs-gitsigns|
|
||||
Telescope ........................................ |diffs-telescope|
|
||||
8. Conflict Resolution .................................... |diffs-conflict|
|
||||
|
|
@ -84,6 +85,7 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
|
|||
integrations = {
|
||||
fugitive = false,
|
||||
neogit = false,
|
||||
neojj = false,
|
||||
gitsigns = false,
|
||||
committia = false,
|
||||
telescope = false,
|
||||
|
|
@ -180,6 +182,14 @@ Configuration is done via `vim.g.diffs`. Set this before the plugin loads:
|
|||
integrations = { neogit = true }
|
||||
<
|
||||
|
||||
{neojj} (boolean|table, default: false)
|
||||
Enable neojj integration. When active,
|
||||
`NeojjStatus`, `NeojjCommitView`, and
|
||||
`NeojjDiffView` filetypes are registered.
|
||||
See |diffs-neojj|. >lua
|
||||
integrations = { neojj = true }
|
||||
<
|
||||
|
||||
{gitsigns} (boolean|table, default: false)
|
||||
Enable gitsigns.nvim blame popup highlighting.
|
||||
See |diffs-gitsigns|. >lua
|
||||
|
|
@ -536,6 +546,7 @@ each integration's filetypes and attaches automatically.
|
|||
integrations = {
|
||||
fugitive = true,
|
||||
neogit = true,
|
||||
neojj = true,
|
||||
gitsigns = true,
|
||||
},
|
||||
}
|
||||
|
|
@ -624,6 +635,17 @@ Expanding a diff in a Neogit buffer (e.g., TAB on a file in the status
|
|||
view) applies treesitter syntax highlighting and intra-line diffs to the
|
||||
hunk lines.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
NEOJJ *diffs-neojj*
|
||||
|
||||
Enable neojj (https://github.com/NicholasZolton/neojj) support: >lua
|
||||
vim.g.diffs = { integrations = { neojj = true } }
|
||||
<
|
||||
|
||||
Expanding a diff in a neojj buffer (e.g., TAB on a file in the status
|
||||
view) applies treesitter syntax highlighting and intra-line diffs to the
|
||||
hunk lines.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
GITSIGNS *diffs-gitsigns*
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue