copilot-emacs / copilot.el

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

Clojure compatibility #229

Closed bilus closed 5 months ago

bilus commented 5 months ago

I haven't tried the previous version but the latest one as of time of writing this, breaks Clojure by changing cursor position after a completion is ignored and I continue typing.

I have a fairly standard CIDER setup and the newest doom-emacs configuration so it should be fairly easy to reproduce but if you need more details, I'll be more than happy to provide them.

In Go it works beautifully, great job!

gen1321 commented 5 months ago

I have the same problem, it's strange. Consider this example suggestion:

Screenshot 2024-01-07 at 15 51 36

if I type d, everything is fine Screenshot 2024-01-07 at 15 52 13

However, when I type e after that Screenshot 2024-01-07 at 15 53 17 I get a closing parenthesis, and e.

It's very annoying, and I can say that it's a new behavior, last couple month it was working just fine

claytharrison commented 5 months ago

This may be somehow related to the jsonrpc error they're working on in #224. I have similar issues with copilot in Python after running a doom upgrade, and was getting an error related to continuation requests, as mentioned in this Doom emacs issue. Only way I can keep coding for now is to turn copilot off.

gen1321 commented 5 months ago

I just upgraded to latest doom version wich includes fixes for events-buffer-scrollback-size error, however the issue still persists.

I am getting another warning about copilot--infer-indentation-offset, but i am getting this one for a long time and it worked just fine, so i doubt that this is a reason

claytharrison commented 5 months ago

Same here actually. I get the warning about copilot--infer-indentation-offset in elisp buffers (but NOT python buffers), except I never got these errors at all until a few days ago when I upgraded doom.

The parenthesis issue still persists in both elisp and python buffers however (have not tried any other languages).

bclark-videra commented 5 months ago

This appears to have been introduced with #222.

bilus commented 5 months ago

UPDATE: I'm getting similar problems in Go. Go integration USED to work great but not after the upgrade.

Pinning version from before #222 seems to have fixed the problem:

(package! copilot
  :recipe (:host github :repo "zerolfx/copilot.el" :files ("*.el" "dist"))
  :pin "653fe7b12990b5b7a050971bed4579022ce4b4f8")
emil-vdw commented 5 months ago

This is almost certainly related to #228. I will try my best to prioritize this and have a fix ready by end of next week.

emil-vdw commented 5 months ago

I have reverted the commit causing the bug (#233) for the time being. Can you confirm that the issue is no longer present on the latest commit?

1334 commented 5 months ago

hi @emil-vdw I can confirm that everything is behaving as before after the revert. Thanks!

emil-vdw commented 5 months ago

Resolved by #233