mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-21 16:39:06 +02:00
refactor: use opts
everywhere, so any plugin config can now be extended
This commit is contained in:
parent
6c73e775cf
commit
77b5e9ab56
3 changed files with 40 additions and 32 deletions
|
@ -83,8 +83,8 @@ return {
|
|||
{
|
||||
"echasnovski/mini.pairs",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("mini.pairs").setup({})
|
||||
config = function(_, opts)
|
||||
require("mini.pairs").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -92,19 +92,20 @@ return {
|
|||
{
|
||||
"echasnovski/mini.surround",
|
||||
keys = { "gz" },
|
||||
config = function()
|
||||
opts = {
|
||||
mappings = {
|
||||
add = "gza", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gzd", -- Delete surrounding
|
||||
find = "gzf", -- Find surrounding (to the right)
|
||||
find_left = "gzF", -- Find surrounding (to the left)
|
||||
highlight = "gzh", -- Highlight surrounding
|
||||
replace = "gzr", -- Replace surrounding
|
||||
update_n_lines = "gzn", -- Update `n_lines`
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
-- use gz mappings instead of s to prevent conflict with leap
|
||||
require("mini.surround").setup({
|
||||
mappings = {
|
||||
add = "gza", -- Add surrounding in Normal and Visual modes
|
||||
delete = "gzd", -- Delete surrounding
|
||||
find = "gzf", -- Find surrounding (to the right)
|
||||
find_left = "gzF", -- Find surrounding (to the left)
|
||||
highlight = "gzh", -- Highlight surrounding
|
||||
replace = "gzr", -- Replace surrounding
|
||||
update_n_lines = "gzn", -- Update `n_lines`
|
||||
},
|
||||
})
|
||||
require("mini.surround").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
|
@ -113,14 +114,15 @@ return {
|
|||
{
|
||||
"echasnovski/mini.comment",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("mini.comment").setup({
|
||||
hooks = {
|
||||
pre = function()
|
||||
require("ts_context_commentstring.internal").update_commentstring({})
|
||||
end,
|
||||
},
|
||||
})
|
||||
opts = {
|
||||
hooks = {
|
||||
pre = function()
|
||||
require("ts_context_commentstring.internal").update_commentstring({})
|
||||
end,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mini.comment").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue