copilot-emacs / copilot.el

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

Not getting suggestions while typing #301

Open mikeiwi opened 2 months ago

mikeiwi commented 2 months ago

Hi folks, I recently installed copilot-emacs and found out that I never get any suggestion as I type. I guess that's the expected behavior, isn't it? When I run copilot-complete I get the suggestion with no problem.

I haven't set any copilot-idle-delay, I just followed the instructions in the repo for doom emacs and added nothing more.

The only workaround I have is that I mapped copilot-complete to C-tab, so I can trigger some suggestions manually. But I think it would be interesting if they appear automatically as I type.

I'm using emacs 28.2

Thank you for your help.

zerolfx commented 2 months ago

Did you have copilot-mode enabled?

mikeiwi commented 2 months ago

Yes, I checked that as well. In fact, when copilot-mode is disabled I get "No completion is available" whenever I run copilot-complete.

datttnwork7247 commented 2 months ago

I faced the same issue with spacemacs, work well when copilot-complete but no suggestion when typing

GNU Emacs 28.1
aarch64-apple-darwin21.1.0
node v21.7.3
company mode disbaled
fpl9000 commented 1 month ago

copilot-idle-delay is used like this:

(when (numberp copilot-idle-delay)
      (setq copilot--post-command-timer
            (run-with-idle-timer copilot-idle-delay
                                 nil
                                 #'copilot--post-command-debounce
                                 (current-buffer))))

So verify that copilot-idle-delay is in fact set to 0 (the default value). And try some values larger than 0.

oikawa-yusuke commented 2 weeks ago

I had the same issue. I resolved it by referring to the following:

https://github.com/copilot-emacs/copilot.el/issues/123

Specifically, the issue was resolved by setting copilot-enable-predicates to nil.