Introduce a LanguageServerId wrapper type

Clarify the meaning of all the usizes in use in all of these
struct fields an method signatures.
This commit is contained in:
Max Brunsfeld 2023-04-19 17:37:28 -07:00
parent c5f86bc6af
commit 4dd917c123
16 changed files with 166 additions and 117 deletions

View file

@ -14,7 +14,7 @@ use language::{
ToPointUtf16,
};
use log::{debug, error};
use lsp::LanguageServer;
use lsp::{LanguageServer, LanguageServerId};
use node_runtime::NodeRuntime;
use request::{LogMessage, StatusNotification};
use settings::Settings;
@ -380,7 +380,7 @@ impl Copilot {
let node_path = node_runtime.binary_path().await?;
let arguments: &[OsString] = &[server_path.into(), "--stdio".into()];
let server = LanguageServer::new(
0,
LanguageServerId(0),
&node_path,
arguments,
Path::new("/"),