From 606248a1af2391f9b3b965c773cd72cd8095d723 Mon Sep 17 00:00:00 2001 From: Zheng Qu Date: Mon, 11 Dec 2023 10:59:38 +0100 Subject: [PATCH] config: Add config for copilot --- spacemacs.org | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/spacemacs.org b/spacemacs.org index f4be7d7..aa37a4b 100644 --- a/spacemacs.org +++ b/spacemacs.org @@ -267,6 +267,22 @@ Autocompletion config for launch files. #+END_SRC +*** copilot +#+BEGIN_SRC emacs-lisp :tangle user-config.el + (setq copilot-node-executable "/usr/bin/node") + + (with-eval-after-load 'company + ;; disable inline previews + (delq 'company-preview-if-just-one-frontend company-frontends)) + + (with-eval-after-load 'copilot + (define-key copilot-completion-map (kbd "") 'copilot-accept-completion) + (define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion) + (define-key copilot-completion-map (kbd "C-TAB") 'copilot-accept-completion-by-word) + (define-key copilot-completion-map (kbd "C-") 'copilot-accept-completion-by-word)) + + (add-hook 'prog-mode-hook 'copilot-mode) +#+END_SRC ** Miscellaneous *** cursor #+BEGIN_SRC emacs-lisp :tangle user-config.el