From e14bfa37d8810bfd35fbbfdbef3ed02f23cc7b29 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 28 Apr 2022 20:02:06 +0100 Subject: [PATCH] fix(completion/copilot): improve copilot's interaction with company-mode Previously we only hide company-mode's in-line preview when there was only a single result. This meant that it didn't show the one result anywhere. This allows company-mode to still show it's regular popup even when there's only one result. --- modules/completion/siren-copilot.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/completion/siren-copilot.el b/modules/completion/siren-copilot.el index 94fc9ec..df78242 100644 --- a/modules/completion/siren-copilot.el +++ b/modules/completion/siren-copilot.el @@ -22,7 +22,12 @@ :config (with-eval-after-load 'company - (delq 'company-preview-if-just-one-frontend company-frontends))) + ;; Use company popup even when there's only one result + (delq 'company-preview-if-just-one-frontend company-frontends) + (setf (nth (position 'company-pseudo-tooltip-unless-just-one-frontend + company-frontends) + company-frontends) + 'company-pseudo-tooltip-frontend))) (provide 'siren-copilot) ;;; siren-copilot.el ends here