feat: mini.surround

This commit is contained in:
punkfairie 2025-01-01 14:24:15 -08:00
parent 1183178899
commit e8f75bb299
Signed by: punkfairie
GPG key ID: A509E8F77FB9D696
3 changed files with 30 additions and 2 deletions

View file

@ -100,6 +100,7 @@ with final.pkgs.lib; let
ts-comments-nvim
mini-comment
mini-ai
mini-surround
# Formatting
conform-nvim

View file

@ -5,8 +5,9 @@ return {
req('friendly-snippets'),
req('lexima-vim'),
req('luasnip'),
req('neotab-nvim'),
req('ts-comments-nvim'),
req('mini-ai'),
req('mini-comment'),
req('mini-surround'),
req('neotab-nvim'),
req('ts-comments-nvim'),
}

View file

@ -0,0 +1,26 @@
local keys = {
add = 'gsa',
delete = 'gsd',
find = 'gsf',
find_left = 'gsF',
highlight = 'gsh',
replace = 'gsr',
update_n_lines = 'gsn',
}
return {
'mini.surround',
keys = {
{ keys.add, desc = 'add surrounding', mode = { 'n', 'v' } },
{ keys.delete, desc = 'delete surrounding' },
{ keys.find, desc = 'find right surrounding' },
{ keys.find_left, desc = 'find left surrounding' },
{ keys.highlight, desc = 'highlight surrounding' },
{ keys.replace, desc = 'replace surrounding' },
{ keys.update_n_lines, desc = 'update n_lines' },
},
after = function()
require('mini.surround').setup({
mappings = keys,
})
end,
}