diff --git a/README.md b/README.md index ca3d72e..f0a04a8 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ syntax highlighting. - Vim syntax fallback for languages without a treesitter parser - Hunk header context highlighting (`@@ ... @@ function foo()`) - Character-level (intra-line) diff highlighting for changed characters +- Inline merge conflict detection, highlighting, and resolution keymaps - Configurable debouncing, max lines, diff prefix concealment, blend alpha, and highlight overrides @@ -63,7 +64,8 @@ luarocks install diffs.nvim compatible, but both plugins modifying line highlights may produce unexpected results - [`git-conflict.nvim`](https://github.com/akinsho/git-conflict.nvim) - - conflict marker highlighting may overlap with `diffs.nvim` + `diffs.nvim` now includes built-in conflict resolution; disable one or the + other to avoid overlap # Acknowledgements diff --git a/lua/diffs/conflict.lua b/lua/diffs/conflict.lua index f0e47c6..f4468d2 100644 --- a/lua/diffs/conflict.lua +++ b/lua/diffs/conflict.lua @@ -216,6 +216,7 @@ local function refresh(bufnr, config) if #regions == 0 then vim.api.nvim_buf_clear_namespace(bufnr, ns, 0, -1) if diagnostics_suppressed[bufnr] then + pcall(vim.diagnostic.reset, nil, bufnr) pcall(vim.diagnostic.enable, true, { bufnr = bufnr }) diagnostics_suppressed[bufnr] = nil end @@ -385,6 +386,7 @@ function M.detach(bufnr) attached_buffers[bufnr] = nil if diagnostics_suppressed[bufnr] then + pcall(vim.diagnostic.reset, nil, bufnr) pcall(vim.diagnostic.enable, true, { bufnr = bufnr }) diagnostics_suppressed[bufnr] = nil end