refactor(coding): replace treesj with mini.splitjoin for code splitting/joining
This commit is contained in:
3 files changed
+26
-12
No files matched your search
@@ -37,7 +37,6 @@
|
||||
"tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "1cb11cc658ee24a9826e3b909ca0b0f5e60597c7" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" },
|
||||
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
|
||||
"treesj": { "branch": "main", "commit": "4770492244ccecdc9b01e0e81fa8f2f6b4a23841" },
|
||||
"uv.nvim": { "branch": "main", "commit": "be4a7d47a976249282bb2f71fc773ac2f5325973" },
|
||||
"vim-suda": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },
|
||||
"vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" },
|
||||
|
||||
@@ -44,14 +44,4 @@ return {
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- split join code
|
||||
{
|
||||
'Wansmer/treesj',
|
||||
keys = { '<space>m', '<space>j', '<space>s' },
|
||||
dependencies = { 'nvim-treesitter/nvim-treesitter' }, -- if you install parsers with `nvim-treesitter`
|
||||
config = function()
|
||||
require('treesj').setup()
|
||||
end,
|
||||
},
|
||||
}
|
||||
+26
-1
@@ -2,11 +2,36 @@ return {
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
require('mini.ai').setup()
|
||||
require('mini.surround').setup()
|
||||
require('mini.pairs').setup()
|
||||
require('mini.icons').setup()
|
||||
require('mini.bracketed').setup()
|
||||
require('mini.tabline').setup()
|
||||
require('mini.splitjoin').setup({
|
||||
mappings = {
|
||||
toggle = '<leader>tj',
|
||||
split = '',
|
||||
join = '',
|
||||
},
|
||||
})
|
||||
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
||||
--
|
||||
-- - asiw) - [Yank] Surrounding Inner Word )Paren (like in surround)
|
||||
-- - ds' - Delete Surround 'quotes
|
||||
-- - rs)' - Replace Surround ) '
|
||||
require('mini.surround').setup({
|
||||
mappings = {
|
||||
add = 'ys', -- Add surrounding in Normal and Visual modes
|
||||
delete = 'ds', -- Delete surrounding
|
||||
find = '', -- Find surrounding (to the right)
|
||||
find_left = '', -- Find surrounding (to the left)
|
||||
highlight = '', -- Highlight surrounding
|
||||
replace = 'cs', -- Replace surrounding
|
||||
update_n_lines = '', -- Update `n_lines`
|
||||
|
||||
suffix_last = 'l', -- Suffix to search with "prev" method
|
||||
suffix_next = 'n', -- Suffix to search with "next" method
|
||||
},
|
||||
})
|
||||
require('mini.indentscope').setup({
|
||||
draw = {
|
||||
delay = 50,
|
||||
|
||||
Reference in new issue
Block a user