diff --git a/home/jonas/doom.nix b/home/jonas/doom.nix index 30bf9ce..757021a 100644 --- a/home/jonas/doom.nix +++ b/home/jonas/doom.nix @@ -77,18 +77,18 @@ in { }; "doom-config/init.el" = { source = ./static/doom-config/init.el; - onChange = "${doom-setup} sync --force"; + onChange = "${doom-setup} sync --force -e"; }; "doom-config/packages.el" = { source = ./static/doom-config/packages.el; - onChange = "${doom-setup} sync --force -u"; + onChange = "${doom-setup} sync --force -u -e"; }; "doom-emacs" = { source = builtins.fetchGit { url = "https://github.com/doomemacs/doomemacs"; rev = "9620bb45ac4cd7b0274c497b2d9d93c4ad9364ee"; }; - onChange = "${doom-setup} --force sync -u"; + onChange = "${doom-setup} --force sync -u -e"; }; }; desktopEntries = { diff --git a/home/jonas/static/doom-config/config.el b/home/jonas/static/doom-config/config.el index f16edef..155f02f 100644 --- a/home/jonas/static/doom-config/config.el +++ b/home/jonas/static/doom-config/config.el @@ -87,3 +87,12 @@ (use-package! direnv :config (direnv-mode)) + +;; accept completion from copilot and fallback to company +(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))) diff --git a/home/jonas/static/doom-config/init.el b/home/jonas/static/doom-config/init.el index 109af5d..a8a8f68 100644 --- a/home/jonas/static/doom-config/init.el +++ b/home/jonas/static/doom-config/init.el @@ -21,7 +21,7 @@ ;;layout ; auie,ctsrnm is the superior home row :completion - company ; the ultimate code completion backend + (company +childframe) ; the ultimate code completion backend ;;(corfu +orderless) ; complete with cap(f), cape and a flying feather! ;;helm ; the *other* search engine for love and life ;;ido ; the other *other* search engine... diff --git a/home/jonas/static/doom-config/packages.el b/home/jonas/static/doom-config/packages.el index 7f1bd33..1eed832 100644 --- a/home/jonas/static/doom-config/packages.el +++ b/home/jonas/static/doom-config/packages.el @@ -52,5 +52,9 @@ (package! conventional-commit :recipe (:host github :repo "akirak/conventional-commit.el" :files ("conventional-commit.el"))) +(package! copilot + :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))) + (package! realgud) (package! direnv) +(package! copilot)