59 lines
1.8 KiB
Lua
59 lines
1.8 KiB
Lua
return {
|
|
{
|
|
'echasnovski/mini.nvim',
|
|
config = function()
|
|
-- Better Around/Inside textobjects
|
|
--
|
|
-- Examples:
|
|
-- - va) - [V]isually select [A]round [)]paren
|
|
-- - yinq - [Y]ank [I]nside [N]ext [']quote
|
|
-- - ci' - [C]hange [I]nside [']quote
|
|
require('mini.ai').setup { n_lines = 500 }
|
|
|
|
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
|
--
|
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
|
-- - sd' - [S]urround [D]elete [']quotes
|
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
|
require('mini.surround').setup()
|
|
|
|
-- Highlighter
|
|
require('mini.hipatterns').setup {
|
|
highlighters = {
|
|
-- Highlight standalone (`#rrggbb`) using that color
|
|
hex_color = require('mini.hipatterns').gen_highlighter.hex_color(),
|
|
hex_short_color = {
|
|
pattern = '#%x%x%x%f[%X]',
|
|
group = function(_, _, data)
|
|
local match = data.full_match
|
|
local correct = '#' .. string.rep(match:sub(2, 2), 2) .. string.rep(match:sub(3, 3), 2) .. string.rep(match:sub(4, 4), 2)
|
|
return MiniHipatterns.compute_hex_color_group(correct, 'bg')
|
|
end,
|
|
},
|
|
},
|
|
}
|
|
|
|
-- Move selected lines
|
|
require('mini.move').setup {
|
|
mappings = {
|
|
-- Move visual selection in Visual mode. Defaults are Alt (Meta) + hjkl.
|
|
left = '<M-Left>',
|
|
right = '<M-Right>',
|
|
down = '<M-Down>',
|
|
up = '<M-Up>',
|
|
|
|
-- Move current line in Normal mode
|
|
line_left = '<M-Left>',
|
|
line_right = '<M-Right>',
|
|
line_down = '<M-Down>',
|
|
line_up = '<M-Up>',
|
|
},
|
|
|
|
options = {
|
|
reindent_linewise = true,
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
}
|