From 7c2beb4cdfbde496b6ed54fa1e50ec58c0c6e187 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 11 May 2022 21:50:24 +0100 Subject: [PATCH] fix(completion/copilot): work around freezing issue caused by visual-line-mode --- modules/completion/siren-copilot.el | 10 +++++++++- straight/versions/default.el | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/completion/siren-copilot.el b/modules/completion/siren-copilot.el index df78242..f8ce370 100644 --- a/modules/completion/siren-copilot.el +++ b/modules/completion/siren-copilot.el @@ -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-" 'copilot-accept-completion) @@ -20,6 +20,14 @@ "C-TAB" 'copilot-accept-completion "" '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 diff --git a/straight/versions/default.el b/straight/versions/default.el index f4e4784..5bd2534 100644 --- a/straight/versions/default.el +++ b/straight/versions/default.el @@ -21,7 +21,7 @@ ("compat" . "65cd985320536065beea311a2b40219ffea49146") ("consult" . "a568960aa2603e1c976d11b826110e21e743526b") ("consult-lsp" . "a8eb3a062feb2715f174500d0624d3a85e000cf7") - ("copilot.el" . "34e5fb9607409576684eda637fc51b1aa30002b5") + ("copilot.el" . "b9c8816bf97d34cdbd22bee189235596e6d3801a") ("cucumber.el" . "e204d9e204b767cf95d6a051ff283f05dc51e9d3") ("dap-mode" . "ea437b24b059ad5be8ccf7ac8c17838c95657f23") ("dart-mode" . "43975c92080e307c4bc14a4773a61195d2062fd9")