copilot-emacs / copilot.el

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

Effect of copilot-enable-predicate #128

Closed rakotomandimby closed 1 year ago

rakotomandimby commented 1 year ago

Hi, this is not an issue but a question. What is the effect of (copilot-enable-predicate nil) or (copilot-enable-predicate t)?

kliph-gladly commented 1 year ago

Hi, from what I can see those functions don't exist in copilot.el. Perhaps you're thinking of the variables https://github.com/zerolfx/copilot.el#copilot-enable-predicates--copilot-disable-predicates .

rakotomandimby commented 1 year ago

@kliph-gladly , yes these are what I thought about. But I dont catch their expected effects.

kliph-gladly commented 1 year ago

They are lists of predicate functions that are evaluated to determine the appropriate conditions for whether a Copilot completion will be created. See https://github.com/zerolfx/copilot.el/blob/main/copilot.el#L543 .