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-04 14:50:49 -05:00
committed by GitHub
co-authored by Peter Tripp
parent ee422dea6e
commit 7da60995cc
4 changed files with 96 additions and 25 deletions
+18
View File
@@ -149,6 +149,24 @@ impl LspAdapter for JsonLspAdapter {
LanguageServerName("json-language-server".into())
}
async fn check_if_user_installed(
&self,
delegate: &dyn LspAdapterDelegate,
_: Arc<dyn LanguageToolchainStore>,
_: &AsyncApp,
) -> Option<LanguageServerBinary> {
let path = delegate
.which("vscode-json-language-server".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,