From 9c91497f9b13998e3b0992cfcceafa4dba0aaf03 Mon Sep 17 00:00:00 2001 From: Henry Chu Date: Sun, 15 Dec 2024 17:14:01 +0800 Subject: [PATCH] Enable yaml-language-server lookup in PATH --- crates/languages/src/yaml.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/crates/languages/src/yaml.rs b/crates/languages/src/yaml.rs index 6d34d9816c..6ca8dfd260 100644 --- a/crates/languages/src/yaml.rs +++ b/crates/languages/src/yaml.rs @@ -53,6 +53,22 @@ impl LspAdapter for YamlLspAdapter { ) as Box<_>) } + async fn check_if_user_installed( + &self, + delegate: &dyn LspAdapterDelegate, + _: Arc, + _: &AsyncAppContext, + ) -> Option { + let path = delegate.which(Self::SERVER_NAME.as_ref()).await?; + let env = delegate.shell_env().await; + + Some(LanguageServerBinary { + path, + env: Some(env), + arguments: vec!["--stdio".into()], + }) + } + async fn fetch_server_binary( &self, latest_version: Box,