cmp-buffer icon indicating copy to clipboard operation
cmp-buffer copied to clipboard

Feature request: don't suggest what is already under the cursor

Open RyanGibb opened this issue 1 year ago • 2 comments

E.g. if the use has typed what, remove what from the completion.

image

RyanGibb avatar May 07 '24 15:05 RyanGibb

I'm not sure why this is happening, since it looks like https://github.com/hrsh7th/cmp-buffer/blob/3022dbc9166796b644a841a02de8dd1cc1d311fa/lua/cmp_buffer/source.lua#L68C34-L68C39 should filter it out

RyanGibb avatar May 07 '24 15:05 RyanGibb

I run into a flavor of this issue a lot.

Repro steps:

  1. Type "hello world"
  2. Place cursor in front of the 'w' in insert mode and hit backspace

At this point, the cursor is between the 'o' and 'w' and nvim-cmp suggests "helloworld"

nvim-cmp

kesyog avatar Jul 19 '24 15:07 kesyog