repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim/lua/bugabinga/grapple.lua
Rawlocal puk = require 'std.puk'
local map = require 'std.map'
puk.defer 'grapple' (function(grapple)
grapple.setup {
scope = "git",
icons = true,
quick_select = "123456789",
}
map.normal { description = 'toggle tag on current file', category = 'grapple', keys = '<leader>mt', command = grapple.toggle }
map.normal { description = 'open tags window', category = 'grapple', keys = '<leader>mT', command = grapple.toggle_tags }
map.normal { description = 'cycle to next tag', category = 'grapple', keys = '<leader>mn', command = function() grapple.cycle_tags("next") end }
map.normal { description = 'cycle to previous tag', category = 'grapple', keys = '<leader>mp', command = function() grapple.cycle_tags("prev") end }
map.normal { description = 'select tag 1', category = 'grapple', keys = '<leader>1', command = function() grapple.select { index = 1 } end }
map.normal { description = 'select tag 2', category = 'grapple', keys = '<leader>2', command = function() grapple.select { index = 2 } end }
map.normal { description = 'select tag 3', category = 'grapple', keys = '<leader>3', command = function() grapple.select { index = 3 } end }
map.normal { description = 'select tag 4', category = 'grapple', keys = '<leader>4', command = function() grapple.select { index = 4 } end }
map.normal { description = 'select tag 5', category = 'grapple', keys = '<leader>5', command = function() grapple.select { index = 5 } end }
require('bugabinga.statusline').register(function()
if not grapple.exists() then return '' end
return ' ' .. grapple.name_or_index()
end)
end)