1Basic idea:
2
3Run the `copilot-node-server` as an LSP
4Reuse our LSP code to use it
5
6Issues:
7- Re-use our github authentication for copilot - ??
8- Integrate Copilot suggestions with `SuggestionMap`
9
10
11
12THE PLAN:
13- Copilot crate.
14- Instantiated with a project / listens to them
15- Listens to events from the project about adding worktrees
16- Manages the copilot language servers per worktree
17- Editor <-?-> Copilot
18
19
20From anotonio in Slack:
21- soooo regarding copilot i was thinking… if it doesn’t really behave like a language server (but they implemented like that because of the protocol, etc.), it might be nice to just have a singleton that is not even set when we’re signed out. when we sign in, we set the global. then, the editor can access the global (e.g. cx.global::<Option<Copilot>>) after typing some character (and with some debouncing mechanism). the Copilot struct could hold a lsp::LanguageServer and then our job is to write an adapter that can then be used to start the language server, but it’s kinda orthogonal to the language servers we store in the project. what do you think?