blink.cmp
blink.cmp copied to clipboard
Ignore suggestions where the insert value is equal to the current keyword
Given this example, typing "foobar" suggests "foobar" from the buffer source to me. Accepting this suggestion results in the keyword "foobar" being replaced with "foobar", effectively doing nothing.
I would suggest to automatically filter out suggestions where the insert value is the same as the current keyword, since those are practically useless.
Makes sense, although there's many cases where we would still want to show the window since accepting can do any of:
- auto-imports (additionalTextEdits)
- trigger commands
- expand a snippet
- etc..
We need to call resolve on the item to ensure that we can hide it which I plan to start calling on the completion window, instead of only on accept and documentation #195
Fair point. Maybe this is simply something to only implement for the buffer source?
We would need to special case this and the plugin has been getting quite complex already. It generally hasn't been an issue for many users it seems, so closing this one