mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(completion): add support for GitHub Copilot via copilot.el
I opted for accepting copilot completions using C-<tab> / <backtab> (shift+tab) instead of regular tab, as it was often getting in the way of yasnippet and lsp completion suggestions. This allows a more explicit acceptance of Copilot suggestions.
This commit is contained in:
@@ -19,8 +19,9 @@
|
||||
(require 'siren-packages)
|
||||
|
||||
;; Completion
|
||||
(require 'siren-company)
|
||||
(require 'siren-cape)
|
||||
(require 'siren-company)
|
||||
(require 'siren-copilot)
|
||||
|
||||
;; Documentation
|
||||
(require 'siren-dash-at-point)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
(require 'siren-company)
|
||||
|
||||
(use-package cape
|
||||
:after company
|
||||
:hook
|
||||
(lsp-completion-mode . siren-cape-capf-lsp-mode-setup)
|
||||
|
||||
|
||||
28
modules/completion/siren-copilot.el
Normal file
28
modules/completion/siren-copilot.el
Normal file
@@ -0,0 +1,28 @@
|
||||
;;; siren-copilot.el --- jimeh's Emacs Siren: copilot configuration.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Basic configuration for copilot. Auto completion on steroids.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package copilot
|
||||
:straight (:host github :repo "zerolfx/copilot.el"
|
||||
:files ("dist" "copilot.el"))
|
||||
:hook
|
||||
(prog-mode . copilot-mode)
|
||||
|
||||
:general
|
||||
("C-<tab>" 'copilot-accept-completion)
|
||||
("<backtab>" 'copilot-accept-completion)
|
||||
(:keymaps 'company-active-map
|
||||
"C-<tab>" 'copilot-accept-completion
|
||||
"C-TAB" 'copilot-accept-completion
|
||||
"<backtab>" 'copilot-accept-completion)
|
||||
|
||||
:config
|
||||
(with-eval-after-load 'company
|
||||
(delq 'company-preview-if-just-one-frontend company-frontends)))
|
||||
|
||||
(provide 'siren-copilot)
|
||||
;;; siren-copilot.el ends here
|
||||
Reference in New Issue
Block a user