diff --git a/config.el b/config.el index e454fa8..d5b0ce2 100644 --- a/config.el +++ b/config.el @@ -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 + ("" . 'copilot-accept-completion) + ("TAB" . 'copilot-accept-completion) + ("C-TAB" . 'copilot-accept-completion-by-word) + ("C-" . 'copilot-accept-completion-by-word))) + ;; load personal modules (load! "org") (load! "gtd") diff --git a/packages.el b/packages.el index 4697479..656db4e 100644 --- a/packages.el +++ b/packages.el @@ -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")))