local map = require('my.functions').map return { { 'https://github.com/tpope/vim-fugitive', version = '*', keys = { { 'gcc', ':Git commit', desc = 'commit' }, { 'gca', ':Git commit --amend', desc = 'amend' }, { 'gP', ':Git push', desc = 'push' }, { 'gpo', ':Git pull origin', desc = 'origin' }, { 'gpu', ':Git pull upstream', desc = 'upstream' }, { 'gau', ':Git add --update --patch', desc = '--update --patch' }, { 'ga%', ':Git add %', desc = 'this file' }, { 'gl', ':Git log --decorate', desc = 'log' }, { 'gs', ':Git status', desc = 'status' }, } }, { 'https://github.com/lewis6991/gitsigns.nvim', version = '*', opts = { on_attach = function(bufnr) local gs = package.loaded.gitsigns map('n', 'gb', function() gs.blame_line({ full = true }) end, 'show blame for current line', bufnr) end, }, }, { 'https://github.com/linrongbin16/gitlinker.nvim', dependencies = { 'plenary.nvim' }, version = '*', opts = { router = { browse = { ["^schlomp%.space"] = "https://schlomp.space/" .. "{_A.ORG}/" .. "{_A.REPO}/src/commit/" .. "{_A.REV}/" .. "{_A.FILE}?display=source" -- '?display=source' .. "#L{_A.LSTART}" .. "{(_A.LEND > _A.LSTART and ('-L' .. _A.LEND) or '')}", ['^git%.gentoo%.org'] = "https://gitweb.gentoo.org/?p=" .. "{string.len(_A.ORG) > 0 and (_A.ORG .. '/') or ''}" .. "{_A.REPO .. '.git'};a=blob;" .. "f={_A.FILE};" .. "hb={_A.REV}" .. "#l{_A.LSTART}", ['^anongit%.gentoo%.org'] = "https://gitweb.gentoo.org/?p=" .. "{string.len(_A.ORG) > 0 and (_A.ORG .. '/') or ''}" .. "{_A.REPO .. '.git'};a=blob;" .. "f={_A.FILE};" .. "hb={_A.REV}" .. "#l{_A.LSTART}", } } } } }