diff options
author | Abouzar Parvan <[email protected]> | 2022-01-23 13:11:01 +0330 |
---|---|---|
committer | GitHub <[email protected]> | 2022-01-23 13:11:01 +0330 |
commit | 869c9530037a37275b213e258d9485784f71771c (patch) | |
tree | 24dc36bd44b962c71d94d28312fd12c98912b174 /lua/lvim/core/autopairs.lua | |
parent | 5f0bc1b7a883284ccb5dc8d151ac28c40816e659 (diff) |
fix(autopairs): remove weird tex rules from autopairs (#2206)
Diffstat (limited to 'lua/lvim/core/autopairs.lua')
-rw-r--r-- | lua/lvim/core/autopairs.lua | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/lua/lvim/core/autopairs.lua b/lua/lvim/core/autopairs.lua index 15c17032..4d9f33f4 100644 --- a/lua/lvim/core/autopairs.lua +++ b/lua/lvim/core/autopairs.lua @@ -49,7 +49,6 @@ end M.setup = function() local autopairs = require "nvim-autopairs" local Rule = require "nvim-autopairs.rule" - local cond = require "nvim-autopairs.conds" autopairs.setup { check_ts = lvim.builtin.autopairs.check_ts, @@ -66,25 +65,6 @@ M.setup = function() fast_wrap = lvim.builtin.autopairs.fast_wrap, } - autopairs.add_rule(Rule("$$", "$$", "tex")) - autopairs.add_rules { - Rule("$", "$", { "tex", "latex" }) -- don't add a pair if the next character is % - :with_pair(cond.not_after_regex_check "%%") -- don't add a pair if the previous character is xxx - :with_pair(cond.not_before_regex_check("xxx", 3)) -- don't move right when repeat character - :with_move(cond.none()) -- don't delete if the next character is xx - :with_del(cond.not_after_regex_check "xx") -- disable add newline when press <cr> - :with_cr(cond.none()), - } - autopairs.add_rules { - Rule("$$", "$$", "tex"):with_pair(function(opts) - print(vim.inspect(opts)) - if opts.line == "aa $$" then - -- don't add pair on that line - return false - end - end), - } - require("nvim-treesitter.configs").setup { autopairs = { enable = true } } local ts_conds = require "nvim-autopairs.ts-conds" |