Add copilot and gptel

This commit is contained in:
Max Schlueter 2024-04-12 10:26:02 +02:00
parent 5c37f99702
commit 655b40956b
2 changed files with 17 additions and 3 deletions

View File

@ -411,6 +411,20 @@
:before #'server-edit
(save-buffer))
(use-package! gptel
:config
(setq! gptel-api-key (lambda () (with-temp-buffer
(insert-file-contents "/run/secrets/chatgpt_api_key")
(buffer-string)))))
(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)))
;; load personal modules
(load! "org")
(load! "gtd")

View File

@ -94,6 +94,6 @@
:branch "main"
:files (:defaults "bin")))
;; https://github.com/doomemacs/doomemacs/issues/7196
;; (unpin! evil-collection)
;; (package! evil-collection :recipe (:repo "emacs-evil/evil-collection" :branch "master"))
(package! gptel)
(package! copilot
:recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el" "dist")))