refactor(plugins): use astrocore

This commit is contained in:
Nicolas Goudry 2024-06-04 08:00:42 +02:00
parent 8a438a9449
commit a36a9c8de0
No known key found for this signature in database
GPG key ID: 5FC434D9FFD1DF44
2 changed files with 4 additions and 14 deletions

View file

@ -34,20 +34,7 @@
rootOpts.keymaps = [
{
key = "<leader>ua";
# https://github.com/AstroNvim/astrocore/blob/v1.4.0/lua/astrocore/toggles.lua#L37-L50
action.__raw = ''
function()
local ok, autopairs = pcall(require, "nvim-autopairs")
if ok then
if autopairs.state.disabled then
autopairs.enable()
else
autopairs.disable()
end
end
end
'';
action.__raw = "function() require('astrocore.toggles').autopairs() end";
options.desc = "Toggle autopairs";
}
];