Move adapters to remote (#18359)

Release Notes:

- ssh remoting: run LSP Adapters on host

---------

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Conrad Irwin 2024-09-25 16:29:04 -06:00 committed by GitHub
parent 40408e731e
commit 64532e94e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 76 additions and 548 deletions

View file

@ -31,6 +31,7 @@ mod yaml;
struct LanguageDir;
pub fn init(languages: Arc<LanguageRegistry>, node_runtime: NodeRuntime, cx: &mut AppContext) {
#[cfg(feature = "load-grammars")]
languages.register_native_grammars([
("bash", tree_sitter_bash::LANGUAGE),
("c", tree_sitter_c::LANGUAGE),
@ -282,9 +283,21 @@ fn load_config(name: &str) -> LanguageConfig {
)
.unwrap();
::toml::from_str(&config_toml)
#[allow(unused_mut)]
let mut config: LanguageConfig = ::toml::from_str(&config_toml)
.with_context(|| format!("failed to load config.toml for language {name:?}"))
.unwrap()
.unwrap();
#[cfg(not(feature = "load-grammars"))]
{
config = LanguageConfig {
name: config.name,
matcher: config.matcher,
..Default::default()
}
}
config
}
fn load_queries(name: &str) -> LanguageQueries {