Enable CSS, JSON, Python, and Tailwind to lookup LSP installed in PATH (#22037)

Co-authored-by: Peter Tripp <peter@zed.dev>
This commit is contained in:
Henry Chu 2025-02-05 03:50:49 +08:00 committed by GitHub
parent ee422dea6e
commit 7da60995cc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 96 additions and 25 deletions

View file

@ -47,6 +47,22 @@ impl LspAdapter for TailwindLspAdapter {
Self::SERVER_NAME.clone()
}
async fn check_if_user_installed(
&self,
delegate: &dyn LspAdapterDelegate,
_: Arc<dyn LanguageToolchainStore>,
_: &AsyncApp,
) -> 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_latest_server_version(
&self,
_: &dyn LspAdapterDelegate,