mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 19:02:07 +00:00
455cdc8b37
Refactor HTTP and github release downloading into util Lazily download / upgrade the copilot LSP from Zed Co-authored-by: Max <max@zed.dev> Co-Authored-By: Antonio <antonio@zed.dev>
1.1 KiB
1.1 KiB
Basic idea:
Run the copilot-node-server
as an LSP
Reuse our LSP code to use it
Issues:
- Re-use our github authentication for copilot - ??
- Integrate Copilot suggestions with
SuggestionMap
THE PLAN:
- Copilot crate.
- Instantiated with a project / listens to them
- Listens to events from the project about adding worktrees
- Manages the copilot language servers per worktree
- Editor <-?-> Copilot
From anotonio in Slack:
- 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>) 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?