copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.79k stars 126 forks source link

feature request or question #211

Closed pcompassion closed 9 months ago

pcompassion commented 9 months ago

It seems I can specify which mode I want copilot turned on.

Since I write up programming designs in org mode, I want copilot to read the org mode and use it in prog-mode.

i.e. read-only mode for copilot (e.g. org mode)

Thank you

emil-vdw commented 9 months ago

Are you wanting to enable copilot for org mode?

emil-vdw commented 9 months ago

If you want to configure copilot mode differently for org mode you can do something like the following:

(defun my/org-mode-copilot ()
  "Set up copilot for org-mode."
  (copilot-mode)
  (setq-local copilot-idle-delay 100000)
 )

(use-package copilot
  ...
  :hook
  (prog-mode . copilot-mode)
  ;; Add the new org mode init function to your hooks.
  (org-mode . my/org-mode-copilot)
  ...)