copilot-emacs / copilot.el

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

more lisp balancer fixes #180

Closed raymond-w-ko closed 10 months ago

raymond-w-ko commented 10 months ago

These are a collection of fixes that I added the past few months while programming in Clojure for my day job.

These fixes usually involve completing something inside a string, usually the doc string.

Very recently, completions are starting to return stuff where the start == end but the completion needs to delete forward a character, i.e. some arbitrary pair forward characters are infix in the completion. I don't have any ideas how to solve this in the general case.

Given the nature of LLMs, sometimes it shifts from stuff that give the right start + end to delete, to the infix stuff mentioned above, even to respecting pairs balances. I have seen all three cases from copilot.

I use this every day wat work, so regressions should be minimal.