This is an automated archive made by the Lemmit Bot.

The original was posted on /r/neovim by /u/BoltlessEngineer on 2023-10-31 17:15:01.


Github

I always wanted better insert-mode navigation fits nice with auto-pair plugins. Normally on single line, just pressing closing brackets allows me to go end of the pair, but when it becomes multi line, I have to exit insert mode just to add semicolon or commas every time.

Few days ago, I found interesting new feature from Helix’s 20.10 release which solves problem above with tree-sitter, so I made a copycat version for Neovim.

Example:

javascript let obj = { key = 1,| // <- press here } let obj = { key = 1, }| // <- cursor moves to here More examples in github

No more need to exit insert mode after multi line auto-pair.