refactor(plugins): use astrocore
This commit is contained in:
parent
8a438a9449
commit
a36a9c8de0
2 changed files with 4 additions and 14 deletions
|
|
@ -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";
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue