neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.27k stars 956 forks source link

Should not add completion that is identical to the word before the cursor #4704

Closed jonashaag closed 12 months ago

jonashaag commented 1 year ago

Result from CocInfo

versions

vim version: NVIM v0.10.0-dev-497+g4229bbe51 node version: v20.4.0 coc.nvim version: 0.0.82-b7375d5f 2023-01-30 05:09:03 +0800 coc.nvim directory: /Users/j/.local/share/nvim/lazy/coc.nvim term: iTerm.app platform: darwin

Describe the bug

In the screenshot I'm looking to get md5_flag so I start typing m, d, which suggests md5 as first entry which is fine, then I continue and have m, d, 5 typed, now IMO there is no point of suggesting md5 anymore because I have typed it completely by hand already If I wanted md5 I'd have stopped after m, d, and accepted the suggestion. If I'm continuing to type I probably don't want that suggestion, and in any case there is no point to suggest it because it's already 100% typed

Reproduce the bug

We will close your issue when you don't provide minimal vimrc and we can't reproduce it

I can reproduce with the mini.vim config.

Screenshots (optional)

Screenshot 2023-07-13 at 12 30 16
jonashaag commented 1 year ago

@fannheyward did you have time to look into this by any chance?

jonashaag commented 11 months ago

Thanks for working on this! It doesn't seem to work though (sorry for the colors, I need to fix dark mode colors)

Screenshot 2023-09-15 at 23 14 10

I have

  "suggest.removeCurrentWord": true

in my settings and latest coc.nvim.

chemzqm commented 11 months ago

Only complete items from around and buffer source are removed.

jonashaag commented 11 months ago

But why?

chemzqm commented 11 months ago

Complete items from language server could be snippet or contains documentation that could be useful.

jonashaag commented 11 months ago

Ok, I’ll maintain my own fork of coc.nvim then, because this is really bad UX for me personally