copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.72k stars 122 forks source link

fix: global-copilot-mode don't enable when buffer is read-only #188

Closed ncaq closed 9 months ago

ncaq commented 9 months ago

I disable it on non-editable screens because the candidates sometimes appear in non-editable situations, such as Magit's status mode.

There are some side effects, such as not being enabled when switching modes from dyed to wdired. However, in wdired, there is almost no new input, and most of the time you are editing an existing string. So I can't think of many situations where I would want to use Copilot with wdired. The user who wants to enable it can add it to the hook and enable it. It can also be enabled on the fly by running the command manually. So I consider this an acceptable side effect.