sourcegraph / emacs-cody

Sourcegraph Cody in Emacs
Apache License 2.0
55 stars 6 forks source link

Got completions working in Emacs #26

Closed steveyegge closed 9 months ago

steveyegge commented 9 months ago

This PR is spread over many commits that I should have squashed (sorry!)

This PR implements completions "correctly" for Cody Emacs. It performs the Myers diff algorithm on the first line of the completion suggestion, and then creates overlays for each insertion. This is how the other clients work too.

Cody-Emacs completions work is now almost completely "finished", but there are a few caveats:

Everything else is working well and you should be able to get good results now from it.

Much progress on unit testing the package; I have finished mocking out the jsonrpc interface and updating the I/O code to be unit-test aware (it was the simplest approach -- a defvar that the unit test sets.)

Still a long way to go on sign-in, onboarding, and of course chat/etc. But completions are largely finished now, as far as I can tell.