Saghen / blink.cmp

Performant, batteries-included completion plugin for Neovim
MIT License
631 stars 26 forks source link

Blink overrides existing insert-mode bindings #39

Closed julienvincent closed 2 days ago

julienvincent commented 2 days ago

I'm just raising my comment from #20 into a new issue for better tracking.

As of ecb3510 blink now replaces insert-mode keybindings in the buffer even when it isn't active / currently completing.

An example of why this causes a problem is that this breaks map_cr = true behaviour from nvim-autopairs:

When I am editing with nvim-autopairs I expect the following behaviour:

fn main() {|}
// Press <Cr>
fn main() {
  |
}

But this is broken with the following blink config:

require("blink.cmp").setup({
  keymap = {
    accept = { "<Cr>" },
  },
})

Ideally we can find a way to both allow <Cr> to accept without swallowing existing <Cr> mappings on the buffer.

This behaviour pairing works fine on nvim-cmp, so it should at least be possible.


P.S Awesome plugin btw, sorry for making so much noise :)

Saghen commented 2 days ago

sorry for making so much noise :)

Don't be! You've been super helpful

julienvincent commented 2 days ago

It works! Thanks!