Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

clojure: Don't cache user-installed `clojure-lsp` (#10636)

Marshall Bowers1ba0bf925b82
diff --git a/extensions/clojure/src/clojure.rs b/extensions/clojure/src/clojure.rs
index 93eb69227bf..29dca03f406 100644
--- a/extensions/clojure/src/clojure.rs
+++ b/extensions/clojure/src/clojure.rs
@@ -11,17 +11,16 @@ impl ClojureExtension {
config: zed::LanguageServerConfig,
worktree: &zed::Worktree,
) -> Result<String> {
+ if let Some(path) = worktree.which("clojure-lsp") {
+ return Ok(path);
+ }
+
if let Some(path) = &self.cached_binary_path {
if fs::metadata(path).map_or(false, |stat| stat.is_file()) {
return Ok(path.clone());
}
}
- if let Some(path) = worktree.which("clojure-lsp") {
- self.cached_binary_path = Some(path.clone());
- return Ok(path);
- }
-
zed::set_language_server_installation_status(
&config.name,
&zed::LanguageServerInstallationStatus::CheckingForUpdate,