From df4855cadbb48de948be9098c0afccec64a7a9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Sun, 10 Sep 2023 01:08:24 +0200 Subject: [PATCH] Changes to the keybinds for the diffview plugin in nvim, as well as adding neovim as default merge tool for git --- .config/nvim/lua/plugins/diffview.lua | 5 +++-- .config/nvim/lua/plugins/which-key.lua | 1 + .gitconfig | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/plugins/diffview.lua b/.config/nvim/lua/plugins/diffview.lua index 0d220a22..71c0b1e2 100644 --- a/.config/nvim/lua/plugins/diffview.lua +++ b/.config/nvim/lua/plugins/diffview.lua @@ -3,8 +3,9 @@ return { "sindrets/diffview.nvim", cmd = { "DiffviewOpen", "DiffviewFileHistory" }, keys = { - { "gd", "DiffviewFileHistory", desc = "Diff File" }, - { "gv", "DiffviewOpen", desc = "Diff View" }, + { "gdd", "DiffviewFileHistory", desc = "Diff File History" }, + { "gdo", "DiffviewOpen", desc = "Open Diff View" }, + { "gdc", "DiffviewClose", desc = "Close Diff View" }, }, event = "BufRead", config = function() diff --git a/.config/nvim/lua/plugins/which-key.lua b/.config/nvim/lua/plugins/which-key.lua index 5cae4025..ffea88fe 100644 --- a/.config/nvim/lua/plugins/which-key.lua +++ b/.config/nvim/lua/plugins/which-key.lua @@ -24,6 +24,7 @@ return { ["x"] = { name = "+diagnostics/quickfix" }, ["cc"] = { name = "+compile" }, ["cp"] = { name = "+packages" }, + ["gd"] = { name = "+diff" }, }, }, config = function(_, opts) diff --git a/.gitconfig b/.gitconfig index faac529b..9decf3bd 100644 --- a/.gitconfig +++ b/.gitconfig @@ -23,6 +23,7 @@ [interactive] diffFilter = diff-so-fancy --patch [merge] + tool = nvim conflictstyle = diff3 [pager] blame = diff-so-fancy | less --tabs=4 -RFX