From b259d28da3700160df21150f9d3628926318782a Mon Sep 17 00:00:00 2001 From: Diachk Date: Wed, 1 Jan 2025 19:53:32 +0000 Subject: [PATCH] Fugitive shortcuts and colors --- lua/config/keymaps.lua | 2 +- lua/plugins/fugitive.lua | 4 +++- lua/plugins/preview-color.lua | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/preview-color.lua diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 9076caf..8723763 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -47,7 +47,7 @@ vim.keymap.set("n", "dm", ":delmarks ", { desc = "Stream current buffer -- Close buffler split vim.keymap.set("n", "bx", ":quit", { desc = "Close focused split buffer" }) -- Jump to implementation -vim.keymap.set("n", "gi", "Telescope lsp_implementations", { desc = "Telescope Go to implementation" }) +vim.keymap.set("n", "gi", "Telescope lsp_implementations", { desc = "Telescope Go to implementation" }) -- Set filte-type vim.keymap.set("n", "ft", ":set filetype=", { desc = "Set file type" }) -- Tidy code diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 25291b2..bac4576 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -2,9 +2,11 @@ return { "tpope/vim-fugitive", -- Optional: Configure lazy loading -- cmd = { "Git", "Gedit", "Gstatus", "Gdiffsplit", "Gblame" }, - keys = { "gi" }, -- Example key mapping for lazy loading + keys = { "gi", "gd" }, -- Example key mapping for lazy loading config = function() -- Optional: Add keymaps or settings for Vim Fugitive here vim.keymap.set("n", "gi", ":Git ", { desc = "Git Status" }) + -- Diff current buffer + vim.keymap.set("n", "gd", ":Gdiffsplit ", { desc = "Show git diff for the current buffer" }) end, } diff --git a/lua/plugins/preview-color.lua b/lua/plugins/preview-color.lua new file mode 100644 index 0000000..418d3dc --- /dev/null +++ b/lua/plugins/preview-color.lua @@ -0,0 +1 @@ +return { "norcalli/nvim-colorizer.lua", opts = {} }