elken / yasnippet-capf

Completion-At-Point Extension for YASnippet
GNU General Public License v3.0
40 stars 9 forks source link

Corfu self-expands with 1 candidate #17

Closed KaratasFurkan closed 8 months ago

KaratasFurkan commented 8 months ago

Hi, first of all, thanks for the package. I just wanted to save some others time by suggesting this. I've spend ~30mins to find why the yasnippet candidates expands themselves when there is only one candidate. It turns out the default value of corfu-on-exact-match is 'insert so when there is only one candidate and it's coming from yasnippet-capf, it's expanded immediately since its :exit-function is yas-expand. Setting (setopt corfu-on-exact-match 'show) resolved the issue.

elken commented 8 months ago

Thanks for reporting this, but I'd rather not add a note about Corfu that'll probably change without notice one day. If someone else runs into the same problem, they'll find this issue :smile:

KaratasFurkan commented 8 months ago

Makes sense, thank you :+1:

elken commented 8 months ago

No problem; thanks for solving it!