From: Huck Boles Date: Sat, 13 May 2023 20:13:51 +0000 (-0500) Subject: git fugitive integration X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=c920a1609ed1a369202c098fbadf381bc904b642;p=nvim.git git fugitive integration --- diff --git a/lua/functions.lua b/lua/functions.lua index d0f2488..f900753 100644 --- a/lua/functions.lua +++ b/lua/functions.lua @@ -1,8 +1,10 @@ -- open help windows in a vertical split vim.api.nvim_create_autocmd("BufWinEnter", { - pattern = { "*.txt" }, + pattern = { "*" }, callback = function() - if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end + if vim.o.filetype == 'help' or 'fugitive' or 'gitcommit' then + vim.cmd.wincmd("L") + end end }) diff --git a/lua/plugins.lua b/lua/plugins.lua index 85039b2..a07bc7a 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -14,6 +14,17 @@ return { { 'tpope/vim-commentary', event = "VeryLazy" }, { 'lukas-reineke/indent-blankline.nvim', event = 'VeryLazy' }, + { + 'tpope/vim-fugitive', + keys = { + { 'G', 'Git' }, + { 'gc', 'Git commit' }, + { 'ga', 'Git add %' }, + { 'gd', 'Gdiffsplit' }, + { 'gb', 'Git blame' }, + }, + }, + { 'akinsho/toggleterm.nvim', keys = { { '', 'ToggleTerm' } }, diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 0f57f11..fe1ef0c 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -14,7 +14,6 @@ return { { 'b', 'Telescope buffers' }, { '', 'Telescope command_history' }, { 'D', 'Telescope diagnostics' }, - { 'g', 'Telescope git_commits' }, }, config = function() require('telescope').setup {