Advertisement
borshigida

Copilot

Nov 24th, 2023
1,167
0
187 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 1.04 KB | None | 0 0
  1. ;; copilot
  2. (defvar bootstrap-version)
  3. (let ((bootstrap-file
  4.        (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
  5.       (bootstrap-version 5))
  6.   (unless (file-exists-p bootstrap-file)
  7.     (with-current-buffer
  8.         (url-retrieve-synchronously
  9.          "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
  10.          'silent 'inhibit-cookies)
  11.       (goto-char (point-max))
  12.       (eval-print-last-sexp)))
  13.   (load bootstrap-file nil 'nomessage))
  14.  
  15. (setq straight-use-package-by-default t)
  16.  
  17. (straight-use-package 'use-package)
  18.  
  19. (use-package copilot
  20.   :straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "*.el"))
  21.   :ensure t
  22.   :config
  23.   ;; Set your preferred keybinding for copilot-complete
  24.   (define-key copilot-mode-map (kbd "M-[") 'copilot-complete)
  25.   (define-key copilot-completion-map (kbd "<M-tab>") 'copilot-accept-completion)
  26.   (define-key copilot-completion-map (kbd "C-<tab>") 'copilot-accept-completion-by-word)
  27.   )
  28.  
  29. (add-hook 'prog-mode-hook 'copilot-mode)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement