mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-20 10:35:08 +02:00
refactor!: remove %
and $
autopairs rules (#3759)
This commit is contained in:
parent
2d3140f0d7
commit
8ea68830a0
1 changed files with 0 additions and 12 deletions
|
@ -55,7 +55,6 @@ M.setup = function()
|
|||
if not status_ok then
|
||||
return
|
||||
end
|
||||
local Rule = require "nvim-autopairs.rule"
|
||||
|
||||
autopairs.setup {
|
||||
check_ts = lvim.builtin.autopairs.check_ts,
|
||||
|
@ -72,17 +71,6 @@ M.setup = function()
|
|||
fast_wrap = lvim.builtin.autopairs.fast_wrap,
|
||||
}
|
||||
|
||||
require("nvim-treesitter.configs").setup { autopairs = { enable = true } }
|
||||
|
||||
local ts_conds = require "nvim-autopairs.ts-conds"
|
||||
|
||||
-- TODO: can these rules be safely added from "config.lua" ?
|
||||
-- press % => %% is only inside comment or string
|
||||
autopairs.add_rules {
|
||||
Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node { "string", "comment" }),
|
||||
Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node { "function" }),
|
||||
}
|
||||
|
||||
if lvim.builtin.autopairs.on_config_done then
|
||||
lvim.builtin.autopairs.on_config_done(autopairs)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue