Created
March 31, 2022 06:49
-
-
Save mopemope/ce74191cd43fe7f1a63ab083f51e2b07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(use-package copilot | |
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "copilot.el")) | |
:ensure t | |
:config | |
(global-unset-key (kbd "TAB")) | |
(global-set-key (kbd "TAB") (lambda (&optional ARG) | |
(interactive) | |
(or (copilot-accept-completion) | |
(indent-for-tab-command ARG)))) | |
(with-eval-after-load 'company | |
(delq 'company-preview-if-just-one-frontend company-frontends)) | |
(add-hook 'after-change-functions (lambda (beg end len) | |
(copilot-clear-overlay) | |
(copilot-complete)) | |
(add-hook 'post-command-hook (lambda () (copilot-clear-overlay))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment