diff --git a/home/neovim/lua/plugins/git.lua b/home/neovim/lua/plugins/git.lua new file mode 100644 index 0000000..a5dcc85 --- /dev/null +++ b/home/neovim/lua/plugins/git.lua @@ -0,0 +1,31 @@ +return { + 'dinhhuy258/git.nvim', + config = { + default_mappings = true, -- NOTE: `quit_blame` and `blame_commit` are still merged to the keymaps even if `default_mappings = false` + + keymaps = { + -- Open blame window + blame = "gb", + -- Close blame window + quit_blame = "q", + -- Open blame commit + blame_commit = "", + -- Open file/folder in git repository + browse = "go", + -- Open pull request of the current branch + open_pull_request = "gp", + -- Create a pull request with the target branch is set in the `target_branch` option + create_pull_request = "gn", + -- Opens a new diff that compares against the current index + diff = "gd", + -- Close git diff + diff_close = "gD", + -- Revert to the specific commit + revert = "gr", + -- Revert the current file to the specific commit + revert_file = "gR", + }, + -- Default target branch when create a pull request + target_branch = "main", + } +} diff --git a/home/neovim/lua/plugins/init.lua b/home/neovim/lua/plugins/init.lua index 72d7e7d..299d2d7 100644 --- a/home/neovim/lua/plugins/init.lua +++ b/home/neovim/lua/plugins/init.lua @@ -1,12 +1,7 @@ return { "psliwka/vim-smoothie", - - -- navigation "tpope/vim-unimpaired", "tpope/vim-surround", - "tpope/vim-fugitive", - "airblade/vim-gitgutter", - "mzlogin/vim-markdown-toc", }