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
16
README.md
16
README.md
|
|
@ -9,7 +9,10 @@ highlighting driven by treesitter.
|
|||
|
||||
## Features
|
||||
|
||||
- Treesitter syntax highlighting in vim-fugitive, Neogit, and `diff` filetype
|
||||
- Treesitter syntax highlighting in
|
||||
[vim-fugitive](https://github.com/tpope/vim-fugitive),
|
||||
[Neogit](https://github.com/NeogitOrg/neogit), builtin `diff` filetype, and
|
||||
more!
|
||||
- Character-level intra-line diff highlighting (with optional
|
||||
[vscode-diff](https://github.com/esmuellert/codediff.nvim) FFI backend for
|
||||
word-level accuracy)
|
||||
|
|
@ -58,15 +61,18 @@ luarocks install diffs.nvim
|
|||
Do not lazy load `diffs.nvim` with `event`, `lazy`, `ft`, `config`, or `keys` to
|
||||
control loading - `diffs.nvim` lazy-loads itself.
|
||||
|
||||
**Q: Does diffs.nvim support vim-fugitive/Neogit/gitsigns?**
|
||||
**Q: Does diffs.nvim support vim-fugitive/Neogit/neojj/gitsigns?**
|
||||
|
||||
Yes. Enable integrations in your config:
|
||||
|
||||
```lua
|
||||
vim.g.diffs = {
|
||||
fugitive = true,
|
||||
neogit = true,
|
||||
gitsigns = true,
|
||||
integrations = {
|
||||
fugitive = true,
|
||||
neogit = true,
|
||||
neojj = true,
|
||||
gitsigns = true,
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue