language servers: Fix wrong language server name (#20428)
This fixes the issue of multiple language servers showing up as `node` in the language server logs dropdown. It does this by changing `language_server.name()` to return the adapter's name, not the binary name, and changing types to make sure that we always use this. Release Notes: - Fixed language server names showing up only as `"node"` --------- Co-authored-by: Sam Rose <hello@samwho.dev> Co-authored-by: Bennet <bennet@zed.dev>
This commit is contained in:
parent
f4024cc602
commit
a97ab5eb3d
39 changed files with 172 additions and 151 deletions
|
@ -21,7 +21,7 @@ use language::{
|
|||
point_from_lsp, point_to_lsp, Anchor, Bias, Buffer, BufferSnapshot, Language, PointUtf16,
|
||||
ToPointUtf16,
|
||||
};
|
||||
use lsp::{LanguageServer, LanguageServerBinary, LanguageServerId};
|
||||
use lsp::{LanguageServer, LanguageServerBinary, LanguageServerId, LanguageServerName};
|
||||
use node_runtime::NodeRuntime;
|
||||
use parking_lot::Mutex;
|
||||
use request::StatusNotification;
|
||||
|
@ -446,9 +446,11 @@ impl Copilot {
|
|||
Path::new("/")
|
||||
};
|
||||
|
||||
let server_name = LanguageServerName("copilot".into());
|
||||
let server = LanguageServer::new(
|
||||
Arc::new(Mutex::new(None)),
|
||||
new_server_id,
|
||||
server_name,
|
||||
binary,
|
||||
root_path,
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue