From f850f5272cdb2d894d6856319e68064c47372b69 Mon Sep 17 00:00:00 2001 From: Haelnorr Date: Sat, 15 Feb 2025 10:05:03 +1100 Subject: [PATCH] Added diffview --- lazy-lock.json | 3 ++- lua/haelnorr/lazy/diffview.lua | 10 ++++++++++ lua/haelnorr/lazy/which-key.lua | 3 ++- 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 lua/haelnorr/lazy/diffview.lua diff --git a/lazy-lock.json b/lazy-lock.json index 4f551ec..3ea759a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,7 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, - "aerial.nvim": { "branch": "master", "commit": "a89f5e39bbbd445242eebdbaac971e0c70ddd3b4" }, + "aerial.nvim": { "branch": "master", "commit": "4c57c5016a6553e0c6b5d93ed60e8fb3dfe69517" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "cellular-automaton.nvim": { "branch": "main", "commit": "1606e9d5d04ff254023c3f3c62842d065708d6d3" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, @@ -10,6 +10,7 @@ "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "conform.nvim": { "branch": "master", "commit": "8ed162b0637d4c4f69ebe3e8e49b35662a82e137" }, + "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "gitsigns.nvim": { "branch": "main", "commit": "2bc3b472bbc2484214549af4d9f38c127b886a55" }, diff --git a/lua/haelnorr/lazy/diffview.lua b/lua/haelnorr/lazy/diffview.lua new file mode 100644 index 0000000..2601e8a --- /dev/null +++ b/lua/haelnorr/lazy/diffview.lua @@ -0,0 +1,10 @@ +return { + "sindrets/diffview.nvim", + config = function() + require("diffview").setup({ + vim.keymap.set("n", "vo", "DiffviewOpen", { desc = "Open Diffview" }), + vim.keymap.set("n", "vc", "DiffviewClose", { desc = "Close Diffview" }), + vim.keymap.set("n", "vf", "DiffviewToggleFiles", { desc = "Toggle File pane" }), + }) + end, +} diff --git a/lua/haelnorr/lazy/which-key.lua b/lua/haelnorr/lazy/which-key.lua index 6d011c3..ea4d019 100644 --- a/lua/haelnorr/lazy/which-key.lua +++ b/lua/haelnorr/lazy/which-key.lua @@ -17,7 +17,8 @@ return { { "t", group = "Telescope" }, { "o", group = "Open plugin", icon = { icon = "", color = "yellow" } }, { "r", group = "Refactoring", mode = { "n", "x" } }, - { "v", group = "LSP Actions", icon = { icon = "󰅡" } }, + { "l", group = "LSP Actions", icon = { icon = "󰅡" } }, + { "v", group = "Diffview", icon = { icon = "" } }, { "", group = "Reload Plugins", icon = { icon = "" } }, { "w", "Lazy reload which-key.nvim", desc = "Reload Which-key" },