feat(mini-pairs): add toggle mini pairs keymap and function

This commit is contained in:
Kevin Traver 2023-09-21 15:53:24 -06:00
parent a72a84972d
commit 39de614eb7

View file

@ -97,6 +97,21 @@ return {
"echasnovski/mini.pairs", "echasnovski/mini.pairs",
event = "VeryLazy", event = "VeryLazy",
opts = {}, opts = {},
keys = {
{
"<leader>up",
function()
local Util = require("lazy.core.util")
vim.g.minipairs_disable = not vim.g.minipairs_disable
if vim.g.minipairs_disable then
Util.warn("Disabled auto pairs", { title = "Option" })
else
Util.info("Enabled auto pairs", { title = "Option" })
end
end,
desc = "Toggle auto pairs",
},
},
}, },
-- Fast and feature-rich surround actions. For text that includes -- Fast and feature-rich surround actions. For text that includes