From 2ab0b3b81976367961048e75d93a029cebc866d8 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Mon, 28 Oct 2024 11:02:46 +0100 Subject: [PATCH] remote server: Fix language servers not starting (#19821) PR #19653 change the code in this diff, which lead to the remote_server binary trying to load language grammars, which in turn failed, and stopped languages from being loaded correctly. That then lead to language servers not starting up. This change reintroduces what #19653 removed, so that we don't load the grammar on the remote_server, by ignoring the grammar name from the config. The tests still all work. Release Notes: - N/A Co-authored-by: Bennet --- crates/languages/src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/languages/src/lib.rs b/crates/languages/src/lib.rs index 7e8c09c8ad..03c4735d6d 100644 --- a/crates/languages/src/lib.rs +++ b/crates/languages/src/lib.rs @@ -288,6 +288,15 @@ fn load_config(name: &str) -> LanguageConfig { .with_context(|| format!("failed to load config.toml for language {name:?}")) .unwrap(); + #[cfg(not(feature = "load-grammars"))] + { + config = LanguageConfig { + name: config.name, + matcher: config.matcher, + ..Default::default() + } + } + config }