Enable yaml-language-server lookup in PATH

This commit is contained in:
Henry Chu 2024-12-15 17:14:01 +08:00
parent f64fcedabb
commit 9c91497f9b
No known key found for this signature in database
GPG key ID: 8B74A8C237C10C06

View file

@ -53,6 +53,22 @@ impl LspAdapter for YamlLspAdapter {
) as Box<_>)
}
async fn check_if_user_installed(
&self,
delegate: &dyn LspAdapterDelegate,
_: Arc<dyn LanguageToolchainStore>,
_: &AsyncAppContext,
) -> Option<LanguageServerBinary> {
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<dyn 'static + Send + Any>,