diff --git a/home.nix b/home.nix index bc20624..a1d28bb 100644 --- a/home.nix +++ b/home.nix @@ -78,7 +78,8 @@ in { mesa.drivers vulkan-loader python312Packages.python-lsp-server - python312Packages.numpy + editorconfig-core-c + copilot-cli ]; # Home Manager is pretty good at managing dotfiles. The primary way to manage diff --git a/home/doom.d/config.el b/home/doom.d/config.el index b79ff18..7978d8b 100644 --- a/home/doom.d/config.el +++ b/home/doom.d/config.el @@ -130,3 +130,15 @@ (map! :leader "pv" #'dirvish) (map! [f5] #'+make/run-last) + + +;; 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))) + +;; (add-to-list 'copilot-major-mode-alist '("typescript" . "javascript")) diff --git a/home/doom.d/init.el b/home/doom.d/init.el index 7ff3bf6..58a5663 100644 --- a/home/doom.d/init.el +++ b/home/doom.d/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/doom.d/packages.el b/home/doom.d/packages.el index d0bf199..7a9933f 100644 --- a/home/doom.d/packages.el +++ b/home/doom.d/packages.el @@ -67,3 +67,9 @@ (package! unity :recipe (:repo "https://github.com/elizagamedev/unity.el")) (add-hook 'after-init-hook #'unity-mode) + +(package! jsonrpc) + +(package! copilot + :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))) +