From a9afb74a0f3b42071602ba0103546a8e7179fd7e Mon Sep 17 00:00:00 2001 From: redjax Date: Mon, 29 Sep 2025 16:13:07 -0400 Subject: [PATCH] fix(fugitive): Add fugitive to work profile --- .../nvim-work/lua/plugins/lazy/fugitive.lua | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 config/nvim-work/lua/plugins/lazy/fugitive.lua diff --git a/config/nvim-work/lua/plugins/lazy/fugitive.lua b/config/nvim-work/lua/plugins/lazy/fugitive.lua new file mode 100644 index 00000000..7e44072c --- /dev/null +++ b/config/nvim-work/lua/plugins/lazy/fugitive.lua @@ -0,0 +1,24 @@ +-- Fugitive git client https://github.com/tpope/vim-fugitive + +return { + "tpope/vim-fugitive", + -- Default: "VeryLazy". "BufReadPre" if you want it loaded earlier + event = "VeryLazy", + + -- Fugitive keybinds + config = function() + vim.keymap.set("n", "gs", ":Git", { desc = "Git status (Fugitive)" }) + vim.keymap.set("n", "gd", ":Gdiffsplit", { desc = "Git diff (Fugitive)" }) + vim.keymap.set("n", "gD", ":Gvdiffsplit", { desc = "3-way diff (Fugitive)" }) + vim.keymap.set("n", "gb", ":Gblame", { desc = "Git blame (Fugitive)" }) + vim.keymap.set("n", "gl", ":Git log --oneline -- %", { desc = "Git log for file" }) + vim.keymap.set("n", "gc", ":Git commit", { desc = "Git commit" }) + vim.keymap.set("n", "gp", ":Git push", { desc = "Git push" }) + vim.keymap.set("n", "gP", ":Git pull", { desc = "Git pull" }) + vim.keymap.set("n", "gr", ":Gread", { desc = "Git checkout file (reset changes)" }) + vim.keymap.set("n", "gw", ":Gwrite", { desc = "Git add (stage) file" }) + vim.keymap.set("n", "gL", ":Gclog", { desc = "Git commit log (quickfix)" }) + vim.keymap.set("n", "gB", ":GBrowse", { desc = "Open in browser (GitHub/GitLab)" }) + vim.keymap.set("n", "ge", ":Gedit", { desc = "Edit file in working tree" }) + end, +}