Commit graph

203 commits

Author SHA1 Message Date
9289f33639 feat(fugitive): add status buffer keymaps for unified diffs
Adds du/dU keymaps to fugitive's :Git status buffer for opening unified
diffs instead of side-by-side diffs:
- du opens horizontal split (mirrors dd)
- dU opens vertical split (mirrors dv)

Parses status buffer lines to extract filename and detect section
(staged/unstaged/untracked). For staged files, diffs index vs HEAD.
For unstaged files, diffs working tree vs index.

Configurable via vim.g.diffs.fugitive.horizontal/vertical (set to
false to disable).
2026-02-04 22:23:21 -05:00
ea60ab8d01 feat(commands): add gdiff_file for diffing arbitrary paths
Adds gdiff_file() which can diff any file path (not just current buffer)
with support for staged vs unstaged changes:
- staged=true diffs index against HEAD
- staged=false diffs working tree against index
- Falls back to HEAD if file not in index (for untracked comparison)
2026-02-04 22:23:13 -05:00
85080514b6 feat(git): add index and working tree content retrieval
Adds functions for accessing git index content and working tree files:
- get_index_content() retrieves file from staging area via :0:path
- get_working_content() reads file directly from disk
- file_exists_in_index() checks if file is staged
- file_exists_at_revision() checks if file exists at given revision
2026-02-04 22:23:09 -05:00
Barrett Ruth
44995aeb19
Merge pull request #57 from barrettruth/feat/gdiff
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
feat: add :Gdiff command
2026-02-04 19:57:23 -05:00
045a9044b5 feat: add :Gdiff, :Gvdiff, :Ghdiff commands for unified diff view
Compares current buffer against any git revision (default HEAD), opens result
with full diffs.nvim syntax highlighting. Follows fugitive convention:
:Gdiff/:Gvdiff open vertical split, :Ghdiff opens horizontal split.
2026-02-04 19:52:17 -05:00
Barrett Ruth
2ce76e7683
Merge pull request #54 from barrettruth/feat/diff-header-highlight
feat: treesitter highlighting for diff headers
2026-02-04 15:41:56 -05:00
f83fb8b4a7 fix: remove useless ci script 2026-02-04 15:39:27 -05:00
a25f1e9d84 feat: treesitter highlighting for diff headers
Apply treesitter highlighting to diff metadata lines (diff --git, index,
---, +++) using the diff language parser. Header info is attached only
to the first hunk of each file to avoid duplicate highlighting.

Based on PR #52 by @phanen with fixes:
- header_lines now only contains diff metadata, not hunk content
- header info attached only to first hunk per file
- removed arbitrary hunk count restriction
2026-02-04 15:11:35 -05:00
Barrett Ruth
4008df3558
Merge pull request #53 from barrettruth/fix/known-limitation-syntax
docs: add incomplete syntax context as known limitation
2026-02-04 13:17:31 -05:00
da7b76555a docs: add incomplete syntax context as known limitation
Treesitter parses diff hunks in isolation without surrounding code
context, which can cause incorrect highlighting when hunks show partial
blocks (e.g., adding lines inside `return { ... }` without seeing the
`return`). Document this as a known limitation in README and vimdoc.
2026-02-04 13:16:22 -05:00
Barrett Ruth
2c943c5b94
Merge pull request #51 from barrettruth/fix/docs-warning
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
remove vim-fugitive as explicit requirement
2026-02-03 16:33:07 -05:00
1723d68cb3 fix(doc): remove vim-fugitive as explicit requirement 2026-02-03 16:27:46 -05:00
Barrett Ruth
26450d20a4
Merge pull request #50 from barrettruth/fix/docs-warning
warn about conflicting plugins
2026-02-03 16:27:13 -05:00
de81fa26cf fix(doc): warn about conflicting diff plugins 2026-02-03 16:25:15 -05:00
bed98791e5 fix(doc): warn about conflicting diff plugins 2026-02-03 16:24:22 -05:00
ddbcec9a1c fix(doc): warn about conflicting diff plugins 2026-02-03 16:24:11 -05:00
Barrett Ruth
c7dcfc4099
Merge pull request #49 from barrettruth/fix/config
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
user `vim.g` over `.setup()`
2026-02-03 16:20:07 -05:00
2b38874699 feat(config): use vim.g over .setup() 2026-02-03 16:18:55 -05:00
Barrett Ruth
75a6bf184c
Merge pull request #47 from barrettruth/fix/remove-enabled-flag
specify
2026-02-03 02:56:24 -05:00
83ffbc3c05 specify 2026-02-03 02:56:07 -05:00
Barrett Ruth
1cd3e9b750
Merge pull request #46 from barrettruth/fix/remove-enabled-flag
fix: remove useless `enabled` flag
2026-02-03 02:55:12 -05:00
fd270b8215 fix(test): remove other uesless test 2026-02-03 02:53:25 -05:00
92cddd75c3 fix(test): remove old test 2026-02-03 02:51:48 -05:00
f71b0f54c5 fix: remove useless enabled flag 2026-02-03 02:50:25 -05:00
Barrett Ruth
a72296384c
Merge pull request #44 from barrettruth/fix/doc
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
fix(doc): move hl documentation to the vimdoc
2026-02-03 01:42:27 -05:00
259763ade4 prefer luarocks install 2026-02-03 01:40:27 -05:00
580fb5e5be fix: ci 2026-02-03 01:36:54 -05:00
2e5400f9c0 fix(doc): move hl documentation to the vimdoc 2026-02-03 01:33:31 -05:00
Barrett Ruth
4a1d4ffb85
Merge pull request #43 from barrettruth/feat/test
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
more robust testing
2026-02-03 01:29:30 -05:00
ee6f5e1c3e improve screenshot 2026-02-03 01:27:53 -05:00
dc45dd66ec fix highlights 2026-02-03 01:21:57 -05:00
188de47d77 feat: docs update (vim-fugitive is optional) 2026-02-03 01:07:37 -05:00
c16699004a feat(test): misc tests for more robustness 2026-02-03 01:02:38 -05:00
Barrett Ruth
0e3bbaaf95
Merge pull request #39 from barrettruth/feat/rename
rename to `diffs.nvim`
2026-02-02 22:27:19 -05:00
877b7f7fe7 fix: use yaml, not yml YAML file extension 2026-02-02 22:14:04 -05:00
0ae692bce7 fix(test): rename 2026-02-02 22:09:27 -05:00
67116f38bc feat: rename everything 2026-02-02 22:09:13 -05:00
Barrett Ruth
8f7442eaa2
Merge pull request #35 from barrettruth/feat/deslop
feat: qol oss improvements
2026-02-02 21:10:40 -05:00
Barrett Ruth
1ab85b698d
Merge branch 'main' into feat/deslop 2026-02-02 21:09:54 -05:00
Barrett Ruth
e25af2503e
Merge pull request #33 from barrettruth/feat/diffsplit
highlighting for diffsplit & more fugitive buftypes
2026-02-02 21:09:47 -05:00
Barrett Ruth
d3b48ab3d9
Merge branch 'main' into feat/diffsplit 2026-02-02 21:08:48 -05:00
Barrett Ruth
6e5a144aa3
Merge pull request #28 from barrettruth/feat/vim
vim highlighting
2026-02-02 21:08:36 -05:00
1dd62373b6 feat: cleanup ci tests 2026-02-02 21:05:25 -05:00
f865c894a5 fix(config): remove useless config option 2026-02-02 18:05:31 -05:00
52bc53e4b5 feat: qol oss improvements 2026-02-02 17:01:22 -05:00
0b9a914f7e feat(doc): update to show more highlighting 2026-02-02 16:55:21 -05:00
ec028dd0e5 feat(doc): more updates 2026-02-02 16:51:48 -05:00
686b02b790 feat: update autocmds for git filetypes with fugiive:/// bufnames 2026-02-02 16:46:58 -05:00
e2a62a6aa5 feat: doc updates and cleanups 2026-02-02 16:39:37 -05:00
9b700ce869 feat: diffsplit support 2026-02-02 16:37:51 -05:00