copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.83k stars 129 forks source link

Compatibility issues with smartparens #310

Open jimeh opened 5 months ago

jimeh commented 5 months ago

copilot-mode doesn't play nice with smartparens-mode, specifically around {.

When the copilot overlay is visible and next character in the Copilot suggestion is ", manually typing a double quote allows smartparens to insert the matching end character.

However when the next character is {, typing that character seems to prevent smartparens from inserting the matching closing character.

Below is a screen recording of Copilot suggesting both " and {. After typing each character I use C+p to move the cursor up a line to clear the copilot overlay.

https://github.com/copilot-emacs/copilot.el/assets/39563/dcd4b78d-234c-4f27-9eb5-f1181d37f599

zerolfx commented 4 months ago

You could try to make the function copilot--self-insert do nothing. This was previously used to prevent overlay flickering.