Enable yaml-language-server
lookup in PATH (#22036)
Release Notes: - Added support for checking for `yaml-language-server` on the`$PATH`. Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
d3eae024a2
commit
b2eceeb4f2
1 changed files with 16 additions and 0 deletions
|
@ -54,6 +54,22 @@ impl LspAdapter for YamlLspAdapter {
|
||||||
) as Box<_>)
|
) 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(
|
async fn fetch_server_binary(
|
||||||
&self,
|
&self,
|
||||||
latest_version: Box<dyn 'static + Send + Any>,
|
latest_version: Box<dyn 'static + Send + Any>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue