From 8e6bda8ac0b265898c8c050e8fb4ccf6d96c18c6 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Sun, 10 Mar 2024 17:10:03 +0200 Subject: [PATCH] chore: restore fugitive --- lazy-lock.json | 2 -- lua/plugins/fugitive.lua | 36 ++++++++++++++++++++++++++++++++++++ lua/plugins/neogit.lua | 1 + 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/fugitive.lua diff --git a/lazy-lock.json b/lazy-lock.json index 3c82eb5..770c053 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -25,7 +25,6 @@ "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, "crates.nvim": { "branch": "main", "commit": "8437522d12a8c523da2aee9db2979d070b2ecc33" }, "darkplus.nvim": { "branch": "master", "commit": "8b150ab676d63a4c452aa04990fcef7ae43adcb6" }, - "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" }, "dracula.nvim": { "branch": "main", "commit": "8d8bddb8814c3e7e62d80dda65a9876f97eb699c" }, "friendly-snippets": { "branch": "main", "commit": "dcd4a586439a1c81357d5b9d26319ae218cc9479" }, "git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" }, @@ -49,7 +48,6 @@ "melange-nvim": { "branch": "master", "commit": "ec15b091304580f1d37e711c3a54bc828b09e255" }, "neodev.nvim": { "branch": "main", "commit": "84e0290f5600e8b89c0dfcafc864f45496a53400" }, "neogen": { "branch": "main", "commit": "e5460f2ad8de3afaf0864497d2c9c0490b702625" }, - "neogit": { "branch": "master", "commit": "9c5b1392f22203c1ea082ad42f2c97f3ca6b5de1" }, "neorg": { "branch": "main", "commit": "086891d396ac9fccd91faf1520f563b6eb9eb942" }, "nightfly": { "branch": "master", "commit": "e17c27c27372dd3db4aeb9a86d294c506de85ae6" }, "nightfox.nvim": { "branch": "main", "commit": "a408e6bb101066952b81de9c11be367114bd561f" }, diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua new file mode 100644 index 0000000..f56dfc8 --- /dev/null +++ b/lua/plugins/fugitive.lua @@ -0,0 +1,36 @@ +return { + "tpope/vim-fugitive", + lazy = false, + keys = { + { "gg", vim.cmd.G, desc = "[G]it" }, + { "gd", vim.cmd.Gdiffsplit, desc = "[G]it [D]iff" }, + { + "gh", + function() + vim.cmd.diffget("//2") + end, + desc = "[G]it Select Left", + }, + { + "gl", + function() + vim.cmd.diffget("//3") + end, + desc = "[G]it Select Right", + }, + { + "gp", + function() + vim.cmd.Git("pull --rebase") + end, + desc = "[G]it [P]ull", + }, + { + "gP", + function() + vim.cmd.Git("push -u origin") + end, + desc = "[G]it [P]ush", + }, + }, +} diff --git a/lua/plugins/neogit.lua b/lua/plugins/neogit.lua index 76f21c7..4a0d018 100644 --- a/lua/plugins/neogit.lua +++ b/lua/plugins/neogit.lua @@ -1,5 +1,6 @@ return { "NeogitOrg/neogit", + enabled = false, dependencies = { "nvim-lua/plenary.nvim", -- required "sindrets/diffview.nvim", -- optional - Diff integration