Skip to content

Apply additional text edits after resolve timeout #1491

@psznm

Description

@psznm

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

EDIT: I managed to fix my issue by setting completion.accept.resolve_timeout_ms to much higher value, but now I am getting error when I leave insert mode before the completion finishes.

blink.cmp/lua/blink/cmp/completion/accept/init.lua:69: Cursor position outside buffer

EDIT2:
This error disappeared when I set completion.accept.dot_repeat to false. But now I am getting random character (the character that my cursor was on when I initiated the menu) added after the completion, if I exit insert mode before the completion finishes.

Original issue:
My LSP is providing auto-import functionality on selecting completion. But with blink.cmp this often does not work very well. It seems to work better when I select the completion, then wait for some time, and then confirm the completion. But when I do it quickly, the auto-import does not happen. This may be caused by some behavior of the LSP, because with nvim-cmp when I do the same thing, the autoimport happens some hundreds of ms after I select the completion (sometimes after I've already left insert mode). So it seems there is some async LSP behavior which blink.cmp does not wait for / does not handle correctly. I really like blink.cmp, but this is the one thing that is making my experience very poor. The LSP in question is vtsls (typescript)

Relevant configuration

neovim version

0.10.4

blink.cmp version

0.14.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptApplying a completion item to the bufferbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions