When the completion is exact match, exit-function should still run.
Say one is using auto-imports feature of pyright. One types foo, and
triggers the completion. There are two candidates: foo and foo_bar. If
one chooses foo, the status would be 'exact' instead of 'finished', thus
exit-function is not executed, foo is not auto-imported.
* eglot.el (eglot-completion-at-point): Consider 'exact status.
Copyright-paperwork-exempt: Yes
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/941
(line-beginning-position))))
:exit-function
(lambda (proxy status)
- (when (eq status 'finished)
+ (when (memq status '(finished exact))
;; To assist in using this whole `completion-at-point'
;; function inside `completion-in-region', ensure the exit
;; function runs in the buffer where the completion was