Skip to content

Is it possible to configure mini.pairs to insert a pair of parentheses after a function is inserted from the completion menu? #399

Closed Answered by echasnovski
Jarmos-san asked this question in Q&A
Discussion options

You must be logged in to vote

I use hrsh7th/nvim-cmp for auto-completion and was it with another plugin - windwp/nvim-autopairs to insert a bracket pair after entering a function from the completions menu. The functionality is well documented in nvim-cmp's wiki.

So, is it possible to configure mini.pairs and nvim-cmp to behave the same?

Functionality of 'mini.pairs' when it comes to actually inserting pairs is quite straightforward: it creates mapings for opening parts to insert whole pair instead of just opening symbol. Hence there is no special functions to emit pairs.

Based on implementation of on_confirm_done() from 'nvim-autopairs', it seems to get necessary information from 'nvim-cmp' event data and act accord…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jarmos-san
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants