clojure-lsp / clojure-lsp-intellij

Intellij Plugin for Clojure & ClojureScript development via Language Server (LSP) made in Clojure
https://clojure-lsp.io
MIT License
76 stars 5 forks source link

cannot run program clojure error=2 #22

Closed glfeng318 closed 9 months ago

glfeng318 commented 9 months ago

i have clojure and clojure-lsp-native installed by brew it raise an warning saying that cannot run program clojure clojure and clojure-lsp both work fine in terminal i have to add

:project-specs [{:project-path "deps.edn"
                  :classpath-cmd ["/opt/homebrew/bin/clojure" "-Spath"]}]

to ./.lsp/config.edn to make the plugin work

ericdallo commented 9 months ago

clojure-lsp is already built-in in the plugin so no need to install it besides the plugin. That issue happens because the PATH environment variable that your intellij was launched doesn't contain clojure, a workaround is to launch Intellij from the terminal that contains a PATH with clojure, I don't think there is anything in the plugin we can do to fix that user issue