Skip to content

Commit

Permalink
Enable yaml-language-server lookup in PATH (#22036)
Browse files Browse the repository at this point in the history
Release Notes:

- Added support for checking for `yaml-language-server` on the`$PATH`.

Co-authored-by: Marshall Bowers <[email protected]>
  • Loading branch information
henryhchchc and maxdeviant authored Jan 9, 2025
1 parent d3eae02 commit b2eceeb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/languages/src/yaml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,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>,
Expand Down

0 comments on commit b2eceeb

Please sign in to comment.