Commit graph

39 commits

Author SHA1 Message Date
Barrett Ruth
5c7e7f4bda
doc: readme video preview (#107)
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
closes #105
2026-02-09 19:40:18 -05:00
Barrett Ruth
2d7d26a1bc
docs(readme): mention vscode-diff algorithm and credit @esmuellert (#103)
## Problem

The README doesn't mention the optional vscode-diff FFI backend for
word-level intra-line accuracy, and the codediff.nvim acknowledgement
doesn't credit the author by name.

## Solution

Expand the intra-line feature bullet to mention vscode-diff with a link
to codediff.nvim. Credit @esmuellert by name in the acknowledgements
section. Also update the stale context padding reference in known
limitations to match the current behavior.
2026-02-09 15:15:42 -05:00
Barrett Ruth
b5d28e9f2b
feat(conflict): add virtual text formatting and action lines (#101)
## Problem

Conflict resolution virtual text only showed plain "current" /
"incoming"
labels with no keymap hints. Users had no way to discover available
resolution keymaps without reading docs.

## Solution

Default virtual text labels now include keymap hints: `(current — doo)`
and
`(incoming — dot)`. A new `format_virtual_text` config option lets users
customize or hide labels entirely. A new `show_actions` option (off by
default) renders a codelens-style action line above each `<<<<<<<`
marker
listing all enabled resolution keymaps. Merge diff views also gain hunk
hints on `@@` header lines showing available keymaps.

New config fields: `conflict.format_virtual_text` (function|nil),
`conflict.show_actions` (boolean). New highlight group:
`DiffsConflictActions`.
2026-02-09 13:55:13 -05:00
a192830d8c fix(conflict): clear stale diagnostics before re-enabling
Problem: after resolving all conflicts, vim.diagnostic.enable(true)
restored diagnostics that were cached while markers were present,
showing errors like "unexpected token end" on clean code.

Solution: call vim.diagnostic.reset() before re-enabling to flush
stale results and let the LSP re-analyze the resolved buffer.
2026-02-07 19:47:45 -05:00
ae65c50f92 docs(readme): mention blend alpha and highlight overrides
Some checks are pending
luarocks / quality (push) Waiting to run
luarocks / publish (push) Blocked by required conditions
2026-02-07 15:53:08 -05:00
f6c0738384 docs: credit phanen for treesitter injection support 2026-02-07 14:32:04 -05:00
9e32384f18 refactor: change highlights.context config to table structure
Problem: highlights.context was a plain integer, inconsistent with the
table structure used by treesitter, vim, and intra sub-configs.

Solution: change to { enabled = true, lines = 25 } with full
vim.validate() coverage matching the existing pattern.
2026-02-07 13:16:34 -05:00
2e1ebdee03 feat(highlight): add treesitter context padding from disk
Problem: treesitter parses each diff hunk in isolation, so incomplete
syntax constructs at hunk boundaries (e.g., a function definition with
no body) produce ERROR nodes and drop captures.

Solution: read N lines from the on-disk file before/after each hunk and
prepend/append them as unmapped padding lines. The line_map guard in
highlight_treesitter skips extmarks for unmapped lines, so padding
provides syntax context without visual output. Controlled by
highlights.context (default 25, 0 to disable). Also applies to the vim
syntax fallback path via a leading_offset filter.
2026-02-07 13:05:53 -05:00
a046f38796 docs: acknowledge difftastic and conflicting plugins 2026-02-07 00:55:37 -05:00
10af59a70d feat(config): replace algorithm 'auto'/'native' with 'default'/'vscode'
'default' inherits algorithm and linematch from diffopt, 'vscode' uses
the FFI library. Removes the need for diffs.nvim to duplicate settings
that users already control globally.
2026-02-06 21:23:40 -05:00
9e857d4b29 feat(fugitive): line position tracking for keymaps
When pressing `du`/`dU` from a hunk line in the fugitive status buffer
(after expanding with `=`), the unified diff now opens at the
corresponding line instead of line 1.

Implementation:
- `fugitive.get_hunk_position()` returns @@ header and offset when on a hunk line
- `commands.find_hunk_line()` finds matching @@ header in diff buffer
- `commands.gdiff_file()` accepts optional `hunk_position` and jumps after opening

Also updates @phanen's README credit for the previous two fixes.

Closes #65
2026-02-05 00:27:35 -05:00
d8332895f3 docs: add fugitive status buffer keymaps documentation
Document the du/dU keymaps for unified diffs in vim-fugitive status
buffers, including behavior by file status and configuration options.
2026-02-04 23:37:39 -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
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
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
1723d68cb3 fix(doc): remove vim-fugitive as explicit requirement 2026-02-03 16:27:46 -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
83ffbc3c05 specify 2026-02-03 02:56:07 -05:00
f71b0f54c5 fix: remove useless enabled flag 2026-02-03 02:50:25 -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
ee6f5e1c3e improve screenshot 2026-02-03 01:27:53 -05:00
188de47d77 feat: docs update (vim-fugitive is optional) 2026-02-03 01:07:37 -05:00
67116f38bc feat: rename everything 2026-02-02 22:09:13 -05:00
0b9a914f7e feat(doc): update to show more highlighting 2026-02-02 16:55:21 -05:00
0c76e5efcb feat(doc): new readme screenshot 2026-02-02 16:07:55 -05:00
Barrett Ruth
5db0e969bf
Update README.md 2026-02-02 01:12:26 -05:00
5d5587b22f feat(doc): add known limitations 2026-02-01 20:20:55 -05:00
73e333e856 acknowledge tpope 2026-02-01 20:10:37 -05:00
79959d1d06 feat(doc): acknowledgements 2026-02-01 19:56:14 -05:00
2b739e3eb7 fix(doc): render readme 2026-02-01 19:55:12 -05:00
2e69785929 feat(doc): image preview 2026-02-01 19:51:16 -05:00
f4b8e325dd feat(doc): more readme stuff 2026-02-01 19:43:30 -05:00
e12b0eb5fc feat(doc): readme 2026-02-01 19:37:44 -05:00
21b8cfb470 feat: add the entire plugin 2026-02-01 17:38:32 -05:00
30b82a7c3f initial commit 2026-02-01 16:25:08 -05:00