Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
34a46b7
chore: announce libvscodediff removal
barrettruth Nov 8, 2026
efaa0e0
refactor!: remove libvscodediff support
barrettruth Nov 8, 2026
5171f20
refactor!: remove extra_filetypes configuration
barrettruth Nov 8, 2026
ffab0b6
refactor: deprecate highlight overrides
barrettruth Nov 8, 2026
994104c
refactor!: remove highlight overrides
barrettruth Nov 8, 2026
f6d2c6f
chore: deprecate automatic conflict diagnostic suppression
barrettruth Nov 8, 2026
0e8df7b
docs: clarify conflict diagnostics recipe
barrettruth Nov 8, 2026
82745f9
refactor!: remove conflict diagnostics and keymap configuration
barrettruth Nov 8, 2026
03e7771
docs: simplify conflict mapping recipes
barrettruth Nov 8, 2026
e800dde
chore: deprecate conflict keymaps
barrettruth Nov 8, 2026
fbe61be
refactor!: remove conflict keymap configuration
barrettruth Nov 8, 2026
adc51ad
refactor: deprecate the intra-line highlighting toggle
barrettruth Nov 8, 2026
c574861
fix: respect inline:none for difftastic token highlights
barrettruth Nov 8, 2026
0ce6ec7
docs: describe inline settings for difftastic views
barrettruth Nov 8, 2026
50a15bd
refactor!: remove the intra-line configuration toggle
barrettruth Nov 8, 2026
a98219c
docs: add a FileType recipe for intra-line highlighting
barrettruth Nov 8, 2026
227cc95
Merge branch 'refactor/deprecate-intra-toggle' into refactor/remove-i…
barrettruth Nov 8, 2026
a5a4b5d
docs: correct the intra-line migration instructions
barrettruth Nov 8, 2026
fa91603
Merge branch 'refactor/deprecate-intra-toggle' into refactor/remove-i…
barrettruth Nov 8, 2026
6663da9
docs: describe intra-line highlighting through diffopt
barrettruth Nov 8, 2026
b935651
Merge branch 'refactor/deprecate-intra-toggle' into refactor/remove-i…
barrettruth Nov 8, 2026
6b53c89
fix: resolve the diffopt documentation merge
barrettruth Nov 8, 2026
c0d5e4f
fix: refresh Difftastic highlights when diffopt changes
barrettruth Nov 8, 2026
bd926fe
Merge remote-tracking branch 'origin/main' into refactor/deprecate-in…
barrettruth Nov 8, 2026
3856f0b
Merge branch 'refactor/deprecate-intra-toggle' into refactor/remove-i…
barrettruth Nov 8, 2026
d3ac22a
Merge remote-tracking branch 'origin/main' into refactor/remove-intra…
barrettruth Nov 8, 2026
f4d19d5
fix: respect deprecated conflict.enabled configuration
barrettruth Nov 8, 2026
01ea25c
refactor!: remove deprecated conflict.enabled support
barrettruth Nov 8, 2026
6326425
fix: migrate legacy highlight settings
barrettruth Nov 8, 2026
d3def3e
refactor!: remove legacy highlight migration support
barrettruth Nov 8, 2026
788f520
fix: warn about ignored conflict and view settings
barrettruth Nov 8, 2026
21c3586
refactor: remove obsolete conflict and view option warnings
barrettruth Nov 8, 2026
6a2beb9
merge: include libvscodediff removal for November comparison
barrettruth Nov 8, 2026
456c221
merge: include extra_filetypes removal for November comparison
barrettruth Nov 8, 2026
924d0f1
merge: include highlight override removal for November comparison
barrettruth Nov 8, 2026
01b28b8
merge: include conflict keymap removal for November comparison
barrettruth Nov 8, 2026
8019956
merge: include intra toggle removal for November comparison
barrettruth Nov 8, 2026
e743a98
merge: include conflict.enabled removal for November comparison
barrettruth Nov 8, 2026
0a779c7
merge: include legacy highlight removal for November comparison
barrettruth Nov 8, 2026
1b34b89
merge: include obsolete warning removal for November comparison
barrettruth Nov 8, 2026
e1a155b
fix: reconcile runtime configuration after removal merges
barrettruth Nov 8, 2026
c80a324
docs: simplify integration guidance and health checks
barrettruth Nov 8, 2026
2e1d124
refactor: consolidate integration attachment and resolve highlights w…
barrettruth Nov 8, 2026
9c6181d
refactor: remove custom configuration validation
barrettruth Nov 8, 2026
60540e7
deprecate: warn about the ineffective Committia option
barrettruth Nov 8, 2026
d01adf9
refactor: remove obsolete Committia configuration support
barrettruth Nov 8, 2026
9752f14
refactor!: remove conflict enabled handling
barrettruth Nov 8, 2026
cfcc332
refactor!: remove legacy highlight handling
barrettruth Nov 8, 2026
cdf9da9
refactor: remove obsolete option warnings
barrettruth Nov 8, 2026
9a0ab93
refactor!: replace highlight overrides with DiffsHighlights
barrettruth Nov 8, 2026
b47bb69
merge: assemble November removals without the collection migration
barrettruth Nov 9, 2026
4a2bbf1
merge: include highlight customization updates in November release
barrettruth Nov 9, 2026
c5ffc24
merge: include conflict option removal in November release
barrettruth Nov 9, 2026
3ae3406
merge: include legacy highlight removal in November release
barrettruth Nov 9, 2026
b811f01
merge: include obsolete warning removal in November release
barrettruth Nov 9, 2026
39c8cd1
merge: include obsolete Committia option removal in November release
barrettruth Nov 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ own command, e.g. `:command! Review Diff review ++nountracked`.
# Acknowledgements

- [`vim-fugitive`](https://github.com/tpope/vim-fugitive)
- [@esmuellert](https://github.com/esmuellert) /
[`codediff.nvim`](https://github.com/esmuellert/codediff.nvim) - vscode-diff
algorithm FFI backend for word-level intra-line accuracy
- [`diffview.nvim`](https://github.com/sindrets/diffview.nvim)
- [`difftastic`](https://github.com/Wilfred/difftastic)
- [`mini.diff`](https://github.com/echasnovski/mini.diff)
Expand Down
123 changes: 50 additions & 73 deletions doc/diffs.nvim.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,89 +154,73 @@ Configuration is done via `vim.g.diffs`. Set options before the plugin loads:
Use `{ args = {...} }` to forward flags. See
|diffs.nvim-difftastic|.

{extra_filetypes} (table, default: {})
Deprecated. See |diffs.nvim-extra-filetypes|.

{highlights} (table, default: see below)
Controls which highlight features are enabled.
Syntax and diff highlighting.
See |diffs.nvim.Highlights| for fields.

{conflict} (boolean|table, default: true)
{conflict} (boolean, default: true)
Highlight and resolve inline merge conflicts.
Set to false to disable.
See |diffs.nvim-conflict|.

*diffs.nvim.Highlights*
Highlights table fields: ~
{background} (boolean, default: true)
Apply background highlighting to `+`/`-` lines
using `DiffsAdd`/`DiffsDelete` groups (derived
from `DiffAdd`/`DiffDelete` backgrounds).
Highlight added and deleted lines with
`DiffsAdd` and `DiffsDelete` backgrounds.

{blend_alpha} (number, default: 0.6)
Alpha value for diff line background intensity.
Controls how strongly diff lines (adds/deletes)
stand out from the editor background. Must be
between 0 and 1 (inclusive).
Blend diff backgrounds with the editor background.
Use 0 for the editor background or 1 for the
full `DiffAdd` and `DiffDelete` colors.

{warn_max_lines} (boolean, default: true)
Show a `vim.notify()` warning when syntax
highlighting is skipped because a hunk exceeds
{max_lines}. See |diffs.nvim-max-lines|.

{treesitter} (table, default: see below)
Treesitter highlighting limits.
Highlight code with Treesitter when a parser
is available.
See |diffs.nvim.TreesitterConfig| for fields.

{vim} (boolean|table, default: true)
Vim syntax fallback highlighting options.
Use Vim syntax when no Treesitter parser is
available. Set to false to disable.
See |diffs.nvim.VimConfig| for fields.

{intra} (boolean|table, default: true)
Boolean values are deprecated.
See |diffs.nvim-diffopt|.
{intra} (table, default: see below)
Intra-line diff highlighting options.
See |diffs.nvim.IntraConfig| for fields.

{overrides} (table, default: {})
Deprecated. See |diffs.nvim-highlights|.

*diffs.nvim.TreesitterConfig*
Treesitter config fields: ~
{max_lines} (integer, default: 500)
Skip treesitter highlighting for hunks with more
highlighted lines (`+`/`-`) than this threshold.
Context lines are not counted. Prevents lag on
massive diffs.
Skip Treesitter highlighting for hunks with more
than this many added and deleted lines.
Context lines do not count toward the limit.

*diffs.nvim.VimConfig*
Vim config fields: ~
{max_lines} (integer, default: 200)
Skip vim syntax highlighting for hunks with more
highlighted lines (`+`/`-`) than this threshold.
Context lines are not counted.
Skip Vim syntax highlighting for hunks with more
than this many added and deleted lines.
Context lines do not count toward the limit.

*diffs.nvim.IntraConfig*
Intra config fields: ~
{algorithm} (string, default: 'default')
Diff algorithm for character-level analysis.
`'default'`: use `vim.diff()` with settings
inherited from `'diffopt'` (`algorithm` and
`linematch`). `'vscode'`: use libvscodediff FFI
(falls back to default if not available).
libvscodediff support will be removed on
30 November 2026. Remove `highlights.intra.algorithm`
to use Neovim's diff.

{max_lines} (integer, default: 500)
Skip character-level highlighting for hunks with
more highlighted lines (`+`/`-`) than this
threshold. Context lines are not counted.
Skip intra-line highlighting for hunks with more
than this many added and deleted lines.
Context lines do not count toward the limit.

Note: Header context (e.g., `@@ -10,3 +10,4 @@ func()`) is always
highlighted with treesitter when a parser is available.
Treesitter also highlights code in hunk headers, such as `func()` in
`@@ -10,3 +10,4 @@ func()`.

Language detection uses Neovim's built-in `vim.filetype.match()` and
`vim.treesitter.language.get_lang()`. To customize filetype detection
or register treesitter parsers for custom filetypes, use
`vim.filetype.add()` and `vim.treesitter.language.register()`.
diffs.nvim detects the filetype with |vim.filetype.match()| and selects
the parser with |vim.treesitter.language.get_lang()|. Use
|vim.filetype.add()| for custom filetypes and
|vim.treesitter.language.register()| to associate them with a parser.

==============================================================================
MAX LINES *diffs.nvim-max-lines*
Expand Down Expand Up @@ -456,7 +440,7 @@ Paired-window behavior: ~ *diffs.nvim-paired-windows*
target language. Each changed line is painted with the same palette as
generated buffers, so its background is continuous across the gutter and the
text, and changed regions within a line carry the same intra-line word-diff
highlighting, honoring `highlights.intra` (including the `vscode` algorithm).
highlighting, honoring `highlights.intra`.

Each pane renders its own side's real line numbers in a `statuscolumn` rail
(blank on filler rows), so the rail does not depend on or conflict with a
Expand Down Expand Up @@ -680,10 +664,6 @@ Whitespace handling: ~ *diffs.nvim-whitespace*
- Native |:diffsplit| windows: whitespace is handled by Neovim itself.

Limitations: ~
- With `highlights.intra.algorithm = 'vscode'` the intra-line highlighter
ignores only leading and trailing whitespace; internal whitespace inside
a changed line is still highlighted. A warning is issued once. Use the
`default` algorithm for full whitespace handling.
- 'diffopt' `algorithm` and `linematch` are honored by the generated diffs
too. `linematch` has no git equivalent, so it shapes the file diffs
computed with |vim.diff()| but not the git-backed surfaces (|:Diff-review|
Expand Down Expand Up @@ -1046,18 +1026,19 @@ unchanged.
==============================================================================
CONFLICT RESOLUTION *diffs.nvim-conflict*

diffs.nvim detects inline merge conflict markers (`<<<<<<<`/`=======`/
`>>>>>>>`) in working files and provides highlighting and resolution actions.
Both standard and diff3 (`|||||||`) formats are supported.
diffs.nvim highlights merge conflicts in working files. It recognizes standard
markers (`<<<<<<<`, `=======`, `>>>>>>>`) and diff3 base sections (`|||||||`).

Conflict regions are detected automatically on `BufReadPost` and re-scanned on
`TextChanged`. When all conflicts in a buffer are resolved, highlighting is
removed.
diffs.nvim detects conflicts when you open a file and updates their highlights
as you edit. Resolve conflicts with the mappings below or edit the text directly.

To disable conflict handling: >lua
vim.g.diffs = { conflict = false }
<

Buffer-local mappings: ~ *diffs.nvim-conflict-keymaps*

`conflict.keymaps` is deprecated and will be removed on 30 November 2026.
Replace it with buffer-local mappings: >lua
Set buffer-local mappings when conflicts are detected: >lua
vim.api.nvim_create_autocmd('User', {
pattern = 'DiffsConflictDetected',
callback = function(event)
Expand Down Expand Up @@ -1176,8 +1157,7 @@ API *diffs.nvim-api*

attach({bufnr}, {options}) *diffs.nvim.attach()*
Attach highlighting to a buffer. Called automatically when the buffer's
filetype matches `git`, `gitcommit`, an enabled integration filetype,
or any entry in the deprecated `extra_filetypes` option.
filetype matches `git`, `gitcommit`, or an enabled integration filetype.
Direct calls work with any filetype. For automatic attachment to other
filetypes, see |diffs.nvim-extra-filetypes|.

Expand Down Expand Up @@ -1482,20 +1462,18 @@ Diff mode window highlights: ~ These are used for 'winhighlight' remapping in
*DiffsDiffText*
DiffsDiffText Background-only replacement for `DiffText`.

After diffs.nvim initializes, customize with |nvim_set_hl()| and
|ColorScheme|: >lua
local function set_highlights()
vim.api.nvim_set_hl(0, 'DiffsAdd', { bg = '#2e4a3a' })
vim.api.nvim_set_hl(0, 'DiffsDiffDelete', { link = 'DiffDelete' })
end

vim.api.nvim_create_autocmd('ColorScheme', {
group = vim.api.nvim_create_augroup('MyDiffsHighlights', { clear = true }),
*DiffsHighlights*
diffs.nvim triggers `User DiffsHighlights` after each highlight update, including
initialization and |ColorScheme| changes. Register this autocmd before loading
diffs.nvim to apply your colors after each update: >lua
vim.api.nvim_create_autocmd('User', {
pattern = 'DiffsHighlights',
group = vim.api.nvim_create_augroup('my_diffs_highlights', { clear = true }),
callback = function()
vim.schedule(set_highlights)
vim.api.nvim_set_hl(0, 'DiffsAdd', { bg = '#2e4a3a' })
vim.api.nvim_set_hl(0, 'DiffsDiffDelete', { link = 'DiffDelete' })
end,
})
vim.schedule(set_highlights)
<

==============================================================================
Expand All @@ -1507,7 +1485,6 @@ Run `:checkhealth diffs` to check the required Neovim version (0.12.0+).
ACKNOWLEDGEMENTS *diffs.nvim-acknowledgements*

- vim-fugitive (https://github.com/tpope/vim-fugitive)
- codediff.nvim (https://github.com/esmuellert/codediff.nvim)
- diffview.nvim (https://github.com/sindrets/diffview.nvim)
- @phanen (https://github.com/phanen) - diff header highlighting,
treesitter injection support, blame_hl.nvim (gitsigns blame popup
Expand Down
2 changes: 1 addition & 1 deletion lua/diffs/commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2245,7 +2245,7 @@ function M.diff_file(filepath, opts)
if diff_label == 'unmerged' then
local conflict_config = runtime.get_conflict_config()
if conflict_config then
require('diffs.merge').attach(diff_buf, conflict_config)
require('diffs.merge').attach(diff_buf)
end
end

Expand Down
107 changes: 5 additions & 102 deletions lua/diffs/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ local integration_metadata = require('diffs.integrations')
---@field max_lines integer

---@class diffs.IntraConfig
---@field algorithm string
---@field max_lines integer

---@class diffs.ViewConfig
Expand All @@ -19,23 +18,10 @@ local integration_metadata = require('diffs.integrations')
---@class diffs.Highlights
---@field background boolean
---@field blend_alpha? number
---@field overrides? table<string, table>
---@field warn_max_lines boolean
---@field treesitter diffs.TreesitterConfig
---@field vim diffs.VimConfig|false
---@field intra diffs.IntraConfig|false

---@class diffs.ConflictKeymaps
---@field ours string|false
---@field theirs string|false
---@field both string|false
---@field none string|false
---@field next string|false
---@field prev string|false

---@class diffs.ConflictConfig
---@field enabled? boolean Deprecated.
---@field keymaps diffs.ConflictKeymaps|false
---@field intra diffs.IntraConfig

---@class diffs.DifftasticConfig
---@field args? string[]
Expand All @@ -45,17 +31,15 @@ local integration_metadata = require('diffs.integrations')
---@field neogit? boolean
---@field neojj? boolean
---@field gitsigns? boolean
---@field committia? boolean
---@field telescope? boolean
---@field difftastic? boolean|diffs.DifftasticConfig

---@class diffs.Config
---@field debug boolean|string
---@field view diffs.ViewConfig
---@field extra_filetypes string[]
---@field highlights diffs.Highlights
---@field integrations diffs.IntegrationsConfig
---@field conflict diffs.ConflictConfig|false
---@field conflict boolean

---@type diffs.Config
local DEFAULTS = {
Expand All @@ -64,7 +48,6 @@ local DEFAULTS = {
default_layout = 'unified',
prefix = true,
},
extra_filetypes = {},
highlights = {
background = true,
warn_max_lines = true,
Expand All @@ -75,14 +58,11 @@ local DEFAULTS = {
max_lines = 200,
},
intra = {
algorithm = 'default',
max_lines = 500,
},
},
integrations = {},
conflict = {
keymaps = false,
},
conflict = true,
}

---@param opts? table
Expand All @@ -97,86 +77,9 @@ function M.new(opts)
opts = vim.tbl_extend('force', opts or {}, {
integrations = integration_metadata.normalize(opts and opts.integrations),
})
if opts.integrations.committia ~= nil then
vim.notify_once(
'[diffs]: integrations.committia is deprecated and ignored. Support ends on November 30, 2026. '
.. 'Committia highlighting is automatic. See :help diffs.nvim-committia.',
vim.log.levels.WARN
)
end
for group, keys in pairs({
conflict = { 'disable_diagnostics', 'show_virtual_text', 'format_virtual_text', 'show_actions' },
view = { 'change_bar', 'rail_separator' },
}) do
if type(opts[group]) == 'table' then
for _, key in ipairs(keys) do
if opts[group][key] ~= nil then
vim.notify_once(
'[diffs]: '
.. group
.. '.'
.. key
.. ' was removed and is ignored. Remove it from the configuration.',
vim.log.levels.WARN
)
end
end
end
end
if opts.highlights and type(opts.highlights.intra) == 'boolean' then
vim.notify_once(
'[diffs]: Boolean highlights.intra is deprecated. Support ends on November 30, 2026. '
.. 'See :help diffs.nvim-diffopt.',
vim.log.levels.WARN
)
end
if opts.highlights and opts.highlights.context ~= nil then
vim.notify_once(
'[diffs]: highlights.context was removed and is ignored. Remove it from the configuration.',
vim.log.levels.WARN
)
end
local result = vim.tbl_deep_extend('force', DEFAULTS, opts)
for _, key in ipairs({ 'treesitter', 'vim', 'intra' }) do
local value = result.highlights[key]
if type(value) == 'table' and value.enabled ~= nil then
local migration = key == 'treesitter'
and 'The enabled field is ignored. Tree-sitter highlighting is always enabled. Remove enabled.'
or key == 'intra' and 'Remove enabled and use diffopt. See :help diffs.nvim-diffopt.'
or 'Use highlights.vim = false to disable Vim syntax. Otherwise remove enabled.'
vim.notify_once(
'[diffs]: highlights.'
.. key
.. '.enabled is deprecated. Support ends on November 30, 2026. '
.. migration,
vim.log.levels.WARN
)
if key ~= 'treesitter' and value.enabled == false then
result.highlights[key] = false
else
value.enabled = nil
end
end
end
if type(result.conflict) == 'table' and result.conflict.enabled ~= nil then
vim.notify_once(
'[diffs]: conflict.enabled is deprecated. Support ends on November 30, 2026. '
.. 'Use conflict = false to disable conflict handling. Otherwise remove enabled.',
vim.log.levels.WARN
)
if result.conflict.enabled == false then
result.conflict = false
else
result.conflict.enabled = nil
end
end
if result.conflict == true then
result.conflict = vim.deepcopy(DEFAULTS.conflict)
end
for _, key in ipairs({ 'vim', 'intra' }) do
if result.highlights[key] == true then
result.highlights[key] = vim.deepcopy(DEFAULTS.highlights[key])
end
if result.highlights.vim == true then
result.highlights.vim = vim.deepcopy(DEFAULTS.highlights.vim)
end
return result
end
Expand Down
Loading
Loading