Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct way to add a new rule #446

Open
deshearth opened this issue Mar 25, 2024 · 0 comments
Open

correct way to add a new rule #446

deshearth opened this issue Mar 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@deshearth
Copy link

Description

I am using lazy.vim to manage plugins. Is the following the correct way to add custom rules.

{
    'windwp/nvim-autopairs',
    event = "InsertEnter",
    config = function ()
      local Rule = require('nvim-autopairs.rule')
      local npairs = require('nvim-autopairs')
      npairs.setup()
      npairs.add_rule(Rule("$","$","tex"))
    end,
}

Other default pairing rules work properly

Mapping bug

1.If you report a bug about indent. Please remember that plugin doesn't do anything about indent.
It just trigger the indent of your vim config so if you have wrong indent config then it will do wrong indent.
You can check by select a block of code and press ==
2. provide result of command :verbose imap <cr>.

Steps to reproduce

No response

Minimal config

{
    'windwp/nvim-autopairs',
    event = "InsertEnter",
    config = function ()
      local Rule = require('nvim-autopairs.rule')
      local npairs = require('nvim-autopairs')
      npairs.setup()
      npairs.add_rule(Rule("$","$","tex"))
    end,
}
@deshearth deshearth added the bug Something isn't working label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant