fix(completion/copilot): work around freezing issue caused by visual-line-mode

This commit is contained in:
2022-05-11 21:50:24 +01:00
parent 216a2778b2
commit 7c2beb4cdf
2 changed files with 10 additions and 2 deletions

View File

@@ -10,7 +10,7 @@
:straight (:host github :repo "zerolfx/copilot.el"
:files ("dist" "copilot.el"))
:hook
(prog-mode . copilot-mode)
(prog-mode . siren-copilot-setup)
:general
("C-<tab>" 'copilot-accept-completion)
@@ -20,6 +20,14 @@
"C-TAB" 'copilot-accept-completion
"<backtab>" 'copilot-accept-completion)
:preface
(defun siren-copilot-setup ()
;; Disable visual-line-mode when copilot-mode is enabled. It prevents
;; freezing issues, details:
;; https://github.com/zerolfx/copilot.el/issues/15#issuecomment-1124244140
(visual-line-mode -1)
(copilot-mode))
:config
(with-eval-after-load 'company
;; Use company popup even when there's only one result