diff --git a/nvim-install.sh b/nvim-install.sh old mode 100644 new mode 100755 diff --git a/nvim/lua/lazy-conf.lua b/nvim/lua/lazy-conf.lua index 3bc48f0..c535aef 100755 --- a/nvim/lua/lazy-conf.lua +++ b/nvim/lua/lazy-conf.lua @@ -18,6 +18,7 @@ require("lazy").setup({ { import = "plugins.lsp" }, { import = "plugins.style" }, { import = "plugins.util" }, + { import = "plugins.util.diff" }, { import = "plugins.testing" }, }, change_detection = { diff --git a/nvim/lua/plugins/nav/neotree.lua b/nvim/lua/plugins/nav/neotree.lua index 648dafc..967fb32 100755 --- a/nvim/lua/plugins/nav/neotree.lua +++ b/nvim/lua/plugins/nav/neotree.lua @@ -328,7 +328,7 @@ return { vim.keymap.set("n", "e", "Neotree", { silent = true, desc = "Open Neotree" }) vim.keymap.set( "n", - "g", + "gg", "Neotree source=git_status position=float", { silent = true, desc = "Open git view" } ) diff --git a/nvim/lua/plugins/util/diff/diffview.lua b/nvim/lua/plugins/util/diff/diffview.lua new file mode 100644 index 0000000..9ae5cc5 --- /dev/null +++ b/nvim/lua/plugins/util/diff/diffview.lua @@ -0,0 +1,11 @@ +return { + -- Diffview + "sindrets/diffview.nvim", + config = function() + local opts = require('utils').opts + vim.keymap.set("n", "gd", ":DiffviewOpen", opts("Start diffview")) + vim.keymap.set("n", "gf", ":DiffviewFileHistory", opts("View file history")) + vim.keymap.set("n", "gc", ":DiffviewClose", opts("Close diffview")) + vim.keymap.set("n", "gr", ":DiffviewRefresh", opts("Refresh diffview")) + end +}