Copilot
This commit is contained in:
28
config.org
28
config.org
@@ -1,5 +1,4 @@
|
||||
* My doom config
|
||||
|
||||
** Appearance settings
|
||||
#+begin_src emacs-lisp
|
||||
(setq doom-font (font-spec :family "Maple Mono" :size 20))
|
||||
@@ -42,3 +41,30 @@ Fix the issue that backspace doesn't work on mac
|
||||
(define-key eat-semi-char-mode-map (kbd "C-h") #'eat-self-input)
|
||||
(define-key eat-semi-char-mode-map (kbd "<backspace>") (kbd "C-h"))))
|
||||
#+end_src
|
||||
|
||||
*** Copilot
|
||||
#+begin_src emacs-lisp :tangle packages.el
|
||||
(package! copilot
|
||||
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el")))
|
||||
#+end_src
|
||||
|
||||
Configuration
|
||||
#+begin_src emacs-lisp
|
||||
;; accept completion from copilot and fallback to company
|
||||
(use-package! copilot
|
||||
:hook (prog-mode . copilot-mode)
|
||||
:bind (:map copilot-completion-map
|
||||
("<tab>" . 'copilot-accept-completion)
|
||||
("TAB" . 'copilot-accept-completion)
|
||||
("C-TAB" . 'copilot-accept-completion-by-word)
|
||||
("C-<tab>" . 'copilot-accept-completion-by-word)
|
||||
("C-n" . 'copilot-next-completion)
|
||||
("C-p" . 'copilot-previous-completion))
|
||||
|
||||
:config
|
||||
(add-to-list 'copilot-indentation-alist '(prog-mode 2))
|
||||
(add-to-list 'copilot-indentation-alist '(org-mode 2))
|
||||
(add-to-list 'copilot-indentation-alist '(text-mode 2))
|
||||
(add-to-list 'copilot-indentation-alist '(clojure-mode 2))
|
||||
(add-to-list 'copilot-indentation-alist '(emacs-lisp-mode 2)))
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user