Replies: 2 comments 1 reply
-
Also: We could use this same panel code to have a "Pop to Panel" functionality in inline completions -- so the user can further study the suggestion before accepting or rejecting it. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Code (WIP) for this functionality: #4678 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Copilot support a
textDocument/copilotPanelCompletion
call that generates a number of code suggestions at point. Unlike inline completions, these completions are supposed to be displayed in a separate window, so the user can inspect the suggestions more thoroughly.Also unlike inline completions,
textDocument/copilotPanelCompletion
is a client-to-server notification -- there's no response. The code suggestions are provided via$/progress
server-to-client notifications. It's up to us to collect these suggestions to then display them.I've implemented this in
lsp-copilot
and the results can be seen below:Gravacao.de.tela.de.2024-12-27.11-20-54.mp4
C-n
/C-p
-- next / previous suggestionC-<return>
on any part of a suggestion accepts itI'm not too sure if this functionality should live inside
lsp-mode
's implementation of copilot itself or if it should be provided as some extra package, being so copilot-specific (though other clients implement some server-specific features, so that would not be too way off).As I see, we can either:
lsp-mode
What do you folks think? Specially @kiennq , who has so kindly reviewed all my copilot PRs so far :)
BTW big kudos for the folks of https://github.com/copilot-emacs/copilot.el who implemented this functionality before -- it saved me a lot of time understanding how to communicate with the server and what the payloads should be like ❤️
Beta Was this translation helpful? Give feedback.
All reactions