diff --git a/lua/custom/plugins/fugitive.lua b/lua/custom/plugins/fugitive.lua new file mode 100644 index 0000000..5562ab2 --- /dev/null +++ b/lua/custom/plugins/fugitive.lua @@ -0,0 +1,16 @@ +-- Switch in fugitive.vim status window with the current one +vim.keymap.set('n', 'gs', 'Gedit :', { desc = '[G]it [S]tatus' }) +-- Fetch all changes +vim.keymap.set('n', 'gF', 'Git fetch', { desc = '[G]it [F]etch' }) +-- Push changes +vim.keymap.set('n', 'gP', 'Git push', { desc = '[G]it [P]ush' }) +-- Pull changes +vim.keymap.set('n', 'gp', 'Git pull', { desc = '[G]it [P]ull' }) + +return { + -- Git related plugins + 'tpope/vim-fugitive', + dependencies = { + 'tpope/vim-rhubarb', + }, +} diff --git a/lua/keymaps.lua b/lua/keymaps.lua index 7886a02..7f27ff2 100644 --- a/lua/keymaps.lua +++ b/lua/keymaps.lua @@ -40,9 +40,6 @@ vim.keymap.set('v', 'pny', '"_dP', { desc = '[P]aste [N]o [Y]ank' }) -- Populate CMD to prepare for change directory vim.keymap.set('n', 'cd', ':cd ', { desc = 'Prepare CMD for [C]hange [D]irectory' }) --- Switch in fugitive.vim status window with the current one -vim.keymap.set('n', 'gs', 'Gedit :', { desc = '[G]it [S]tatus' }) - -- Delete current buffer without closing window vim.keymap.set('n', 'bd', 'bpspbnbd', { desc = '[B]uffer [D]elete' }) -- Switch to between buffers diff --git a/lua/lazy-plugins.lua b/lua/lazy-plugins.lua index eba43e1..7669dd9 100644 --- a/lua/lazy-plugins.lua +++ b/lua/lazy-plugins.lua @@ -19,10 +19,6 @@ require('lazy').setup({ -- Practice games 'ThePrimeagen/vim-be-good', - -- Git related plugins - 'tpope/vim-fugitive', - 'tpope/vim-rhubarb', - -- Processing-Java 'sophacles/vim-processing',