Skip to content

Cursor jumps after closing bracket on Enter #549

Description

@plutov

Description

When I am in Go file, I type const () and click Enter.

const (
  <- must be here
)
| <- cursor

This started recently.

i  <CR>        * v:lua.require'nvim-autopairs'.completion_confirm()
                 autopairs completion confirm
        Last set from ~/.config/nvim/init.lua (run Nvim with -V1 for more details)

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

  • Open Go file
  • Type const (
  • Closing ) appears
  • (CURSOR IS HERE)
  • Press Enter
  • cursor is not insiude

Minimal config

require("nvim-autopairs").setup()

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions