my config yay
This commit is contained in:
parent
d605b840a2
commit
f4b595733a
32 changed files with 1108 additions and 715 deletions
58
lua/custom/plugins/mini.lua
Normal file
58
lua/custom/plugins/mini.lua
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
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,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue