Skip to content

Commit

Permalink
config: Add config for copilot
Browse files Browse the repository at this point in the history
  • Loading branch information
Maverobot committed Dec 11, 2023
1 parent eb72156 commit 606248a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spacemacs.org
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<tab>") '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-<tab>") 'copilot-accept-completion-by-word))

(add-hook 'prog-mode-hook 'copilot-mode)
#+END_SRC
** Miscellaneous
*** cursor
#+BEGIN_SRC emacs-lisp :tangle user-config.el
Expand Down

0 comments on commit 606248a

Please sign in to comment.