copilot.el icon indicating copy to clipboard operation
copilot.el copied to clipboard

Not getting suggestions while typing

Open mikeiwi opened this issue 1 year ago • 6 comments

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.

mikeiwi avatar May 01 '24 14:05 mikeiwi

Did you have copilot-mode enabled?

zerolfx avatar May 01 '24 14:05 zerolfx

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

mikeiwi avatar May 01 '24 14:05 mikeiwi

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

datnguyen-tt avatar May 02 '24 16:05 datnguyen-tt

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.

fpl9000 avatar May 31 '24 18:05 fpl9000

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.

oikawa-yusuke avatar Jun 17 '24 05:06 oikawa-yusuke

Yes, the same solved it for me too. (setq copilot-enable-predicates nil) fixes the issue

ovistoica avatar Jul 10 '24 04:07 ovistoica

Sorry for coming back this late. Just tested and, as @ovistoica and @oikawa-yusuke mentioned, (setq copilot-enable-predicates nil) fixed the issue for me as well. I'm closing this issue.

Thank you everyone!

mikeiwi avatar Sep 08 '24 19:09 mikeiwi