Use new language server info on remote servers (#35682)
* Straightens out the `*_ext.rs` workflow for clangd and rust-analyzer: no need to asynchronously query for the language server, as we sync that information already. * Fixes inlay hints editor menu toggle not being shown in the remote sessions Release Notes: - Fixed inlay hints editor menu toggle not being shown in the remote sessions
This commit is contained in:
parent
cc93175256
commit
9caa9d042a
14 changed files with 176 additions and 291 deletions
|
@ -29,16 +29,14 @@ pub fn switch_source_header(
|
|||
return;
|
||||
};
|
||||
|
||||
let server_lookup =
|
||||
find_specific_language_server_in_selection(editor, cx, is_c_language, CLANGD_SERVER_NAME);
|
||||
let Some((_, _, server_to_query, buffer)) =
|
||||
find_specific_language_server_in_selection(editor, cx, is_c_language, CLANGD_SERVER_NAME)
|
||||
else {
|
||||
return;
|
||||
};
|
||||
let project = project.clone();
|
||||
let upstream_client = project.read(cx).lsp_store().read(cx).upstream_client();
|
||||
cx.spawn_in(window, async move |_editor, cx| {
|
||||
let Some((_, _, server_to_query, buffer)) =
|
||||
server_lookup.await
|
||||
else {
|
||||
return Ok(());
|
||||
};
|
||||
let source_file = buffer.read_with(cx, |buffer, _| {
|
||||
buffer.file().map(|file| file.path()).map(|path| path.to_string_lossy().to_string()).unwrap_or_else(|| "Unknown".to_string())
|
||||
})?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue