diff --git a/nvim/.config/nvim/after/plugin/fugitive.vim b/nvim/.config/nvim/after/plugin/fugitive.vim index 654523c..7f4418c 100644 --- a/nvim/.config/nvim/after/plugin/fugitive.vim +++ b/nvim/.config/nvim/after/plugin/fugitive.vim @@ -28,6 +28,9 @@ nnoremap g+ :Git stash pop nnoremap gs :Git stash list nnoremap gS :Git stash -- % nnoremap gt :Git reflog +xnoremap gu :GBrowse! +xnoremap gU :GBrowse +nnoremap gu :GBrowse nnoremap gw :Gwrite nnoremap G :Git diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 7028294..119209e 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -57,7 +57,6 @@ vim.g.loaded_perl_provider = 0 vim.g.loaded_node_provider = 0 -- Disable some in built plugins completely -vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 vim.g.loaded_matchparen = 1 vim.g.loaded_matchit = 1 @@ -91,6 +90,8 @@ vim.g['sneak#use_ic_scs'] = 0 vim.g.dirvish_relative_paths = 1 -- dispatch vim.g.dispatch_no_maps = 1 +-- vim-fugitive GBrowse GitLab +vim.g.fugitive_gitlab_domains = {'https://gitlab.freedesktop.org', 'https://gitlab.gnome.org/GNOME', 'https://gitlab.com'} -- We do this to prevent the loading of the system fzf.vim plugin. This is -- present at least on Arch/Manjaro diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index c29e778..8947daf 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -32,7 +32,16 @@ local init = function () } -- Git support use 'lewis6991/gitsigns.nvim' - use 'tpope/vim-fugitive' + use { + 'tpope/vim-fugitive', + requires = { + -- GBrowse support + 'tpope/vim-rhubarb', + 'shumphrey/fugitive-gitlab.vim', + 'https://git.sr.ht/~willdurand/srht.vim', + 'mattn/webapi-vim' + } + } use 'rhysd/git-messenger.vim' use 'whiteinge/diffconflicts' -- Boost vim command line mode