Add a specific server id to a Copilot LSP

This commit is contained in:
Kirill Bulatov 2023-09-19 12:32:02 +03:00
parent 91fac2aa76
commit 5b0b2fe50b
3 changed files with 26 additions and 12 deletions

View file

@ -129,6 +129,7 @@ fn main() {
let client = client::Client::new(http.clone(), cx);
let mut languages = LanguageRegistry::new(login_shell_env_loaded);
let copilot_language_server_id = languages.next_language_server_id();
languages.set_executor(cx.background().clone());
languages.set_language_server_download_dir(paths::LANGUAGES_DIR.clone());
let languages = Arc::new(languages);
@ -159,7 +160,7 @@ fn main() {
semantic_index::init(fs.clone(), http.clone(), languages.clone(), cx);
vim::init(cx);
terminal_view::init(cx);
copilot::init(http.clone(), node_runtime, cx);
copilot::init(copilot_language_server_id, http.clone(), node_runtime, cx);
ai::init(cx);
component_test::init(cx);