ref(nvim): redid plugin config system

This commit is contained in:
Léana 江 2024-01-26 10:46:05 +01:00 committed by Léana 江
parent d5406b8487
commit 56336c8e5e
14 changed files with 16 additions and 0 deletions

View file

@ -1,24 +0,0 @@
local Rule = require "nvim-autopairs.rule"
local cond = require "nvim-autopairs.conds"
local npairs = require "nvim-autopairs"
npairs.setup()
-- Intergration with `cmp`
local cmp = require "cmp"
local cmp_autopairs = require "nvim-autopairs.completion.cmp"
cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done())
-------------------
-- Tex and Typst --
-------------------
npairs.add_rules {
Rule("$", "$", { "tex", "typst" })
:with_pair(cond.not_before_regex "%a")
:with_pair(cond.not_after_regex "%a")
:with_move(cond.done),
Rule("```", "```", "typst")
:with_pair(cond.not_before_text "```")
:with_cr(cond.done),
}