From f4d19d5d880d9fd627e8ffdd23e8385e88f4bac5 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 8 Nov 2026 15:07:43 -0600 Subject: [PATCH 1/2] fix: respect deprecated conflict.enabled configuration --- lua/diffs/config.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/diffs/config.lua b/lua/diffs/config.lua index a1ad9fd2..374d1e64 100644 --- a/lua/diffs/config.lua +++ b/lua/diffs/config.lua @@ -34,6 +34,7 @@ local integration_metadata = require('diffs.integrations') ---@field prev string|false ---@class diffs.ConflictConfig +---@field enabled? boolean Deprecated. ---@field keymaps diffs.ConflictKeymaps|false ---@class diffs.DifftasticConfig @@ -146,6 +147,7 @@ function M.validate(opts) return v == nil or type(v) == 'boolean' or type(v) == 'table' end, 'boolean or table') if type(opts.conflict) == 'table' then + vim.validate('conflict.enabled', opts.conflict.enabled, 'boolean', true) vim.validate('conflict.keymaps', opts.conflict.keymaps, function(v) return v == nil or v == false or type(v) == 'table' end, 'table or false') @@ -189,6 +191,18 @@ function M.new(opts) ) end local result = vim.tbl_deep_extend('force', DEFAULTS, opts) + 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 From 01ea25cbbc80baa24be7991f42a9f77c0b06b3e3 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 8 Nov 2026 15:08:32 -0600 Subject: [PATCH 2/2] refactor!: remove deprecated conflict.enabled support --- lua/diffs/config.lua | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/lua/diffs/config.lua b/lua/diffs/config.lua index 374d1e64..34f5810a 100644 --- a/lua/diffs/config.lua +++ b/lua/diffs/config.lua @@ -34,7 +34,6 @@ local integration_metadata = require('diffs.integrations') ---@field prev string|false ---@class diffs.ConflictConfig ----@field enabled? boolean Deprecated. ---@field keymaps diffs.ConflictKeymaps|false ---@class diffs.DifftasticConfig @@ -147,7 +146,7 @@ function M.validate(opts) return v == nil or type(v) == 'boolean' or type(v) == 'table' end, 'boolean or table') if type(opts.conflict) == 'table' then - vim.validate('conflict.enabled', opts.conflict.enabled, 'boolean', true) + vim.validate('conflict.enabled', opts.conflict.enabled, 'nil') vim.validate('conflict.keymaps', opts.conflict.keymaps, function(v) return v == nil or v == false or type(v) == 'table' end, 'table or false') @@ -191,18 +190,6 @@ function M.new(opts) ) end local result = vim.tbl_deep_extend('force', DEFAULTS, opts) - 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