diff --git a/nvim/.config/nvim/README.md b/nvim/.config/nvim/README.md index 98d6dac..1ff8f46 100644 --- a/nvim/.config/nvim/README.md +++ b/nvim/.config/nvim/README.md @@ -43,6 +43,8 @@ Git shortcuts: - `:Git` to run commands directly (`:Git status`, `:Git log --oneline`) - `lg` open LazyGit +- `dv` open Diffview +- `dc` close Diffview Toggle shortcuts: diff --git a/nvim/.config/nvim/lua/romanzy/keymaps.lua b/nvim/.config/nvim/lua/romanzy/keymaps.lua index b94528a..b515d15 100644 --- a/nvim/.config/nvim/lua/romanzy/keymaps.lua +++ b/nvim/.config/nvim/lua/romanzy/keymaps.lua @@ -26,6 +26,8 @@ map("n", "fg", telescope_picker("live_grep"), { desc = "live grep" }) map("n", "fb", telescope_picker("buffers"), { desc = "find buffers" }) map("n", "fh", telescope_picker("help_tags"), { desc = "help tags" }) map("n", "lg", "LazyGit", { desc = "open lazygit" }) +map("n", "dv", "DiffviewOpen", { desc = "open diffview" }) +map("n", "dc", "DiffviewClose", { desc = "close diffview" }) map("n", "tw", require("romanzy.custom.wrap").toggle, { desc = "toggle soft wrap" }) map("n", "sv", "vs", { desc = "split vertical" }) diff --git a/nvim/.config/nvim/lua/romanzy/plugins.lua b/nvim/.config/nvim/lua/romanzy/plugins.lua index 265d260..afd7b9d 100644 --- a/nvim/.config/nvim/lua/romanzy/plugins.lua +++ b/nvim/.config/nvim/lua/romanzy/plugins.lua @@ -1,6 +1,7 @@ require("romanzy.plugins.rose-pine") require("romanzy.plugins.mini") require("romanzy.plugins.lazygit") +require("romanzy.plugins.diffview") require("romanzy.plugins.oil") require("romanzy.plugins.telescope") require("romanzy.plugins.nvim-treesitter") diff --git a/nvim/.config/nvim/lua/romanzy/plugins/diffview.lua b/nvim/.config/nvim/lua/romanzy/plugins/diffview.lua new file mode 100644 index 0000000..ed871ce --- /dev/null +++ b/nvim/.config/nvim/lua/romanzy/plugins/diffview.lua @@ -0,0 +1,6 @@ +vim.pack.add({ + { + src = "https://github.com/sindrets/diffview.nvim", + name = "diffview.nvim", + }, +}) diff --git a/nvim/.config/nvim/nvim-pack-lock.json b/nvim/.config/nvim/nvim-pack-lock.json index d5b8a36..f64c043 100644 --- a/nvim/.config/nvim/nvim-pack-lock.json +++ b/nvim/.config/nvim/nvim-pack-lock.json @@ -8,6 +8,10 @@ "rev": "619363c30309d29ffa631e67c8183f2a72caa373", "src": "https://github.com/stevearc/conform.nvim" }, + "diffview.nvim": { + "rev": "4516612fe98ff56ae0415a259ff6361a89419b0a", + "src": "https://github.com/sindrets/diffview.nvim" + }, "lazygit.nvim": { "rev": "a04ad0dbc725134edbee3a5eea29290976695357", "src": "https://github.com/kdheepak/lazygit.nvim"