repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
neovim/lua/bugabinga/plugins/surround.lua
Rawreturn {
'kylechui/nvim-surround',
event = 'VeryLazy',
version = '2.*',
opts = {
-- setting key maps for this plugin is pretty intricate.
-- normally I would set them myself, but in this case not...
keymaps = {
insert = '<C-g>s',
insert_line = '<C-g>S',
normal = 'sa',
normal_line = 'sA',
normal_cur = 'sa',
normal_cur_line = 'sC',
visual = 'sa',
visual_line = 'sA',
delete = 'sd',
change = 'sr',
change_line = 'sR',
},
surrounds = {
['R'] = {
add = { "require '", "'" },
find = "require%b''",
--FIXME: find out how to craft these, those cannot be correct right now
delete = "^(require')().-(')()$",
change = {
target = "^(require')().-('()$",
},
},
['P'] = {
add = { 'vim.print(', ')' },
find = 'vim%.print%b()',
delete = '^(vim%.print%()().-(%))()$',
change = {
target = '^(vim%.print%()().-(%))()$',
},
},
},
},
dependencies = {
'nvim-treesitter/nvim-treesitter',
},
}