This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-06
Channels
- # aws (1)
- # beginners (7)
- # calva (2)
- # chlorine-clover (4)
- # cider (4)
- # clj-kondo (20)
- # clojure (43)
- # clojure-losangeles (1)
- # clojure-norway (24)
- # clojurescript (4)
- # community-development (2)
- # hyperfiddle (27)
- # kaocha (2)
- # lsp (17)
- # malli (1)
- # pedestal (1)
- # portal (8)
- # practicalli (5)
- # reagent (22)
- # releases (1)
- # shadow-cljs (1)
- # squint (1)
I'm trying to install the clojure-lsp-intellij plugin and am seeing the following error when I start my project. I've tried the following in an IntelliJ terminal to diagnose:
➜ git:(main) ✗ which clojure
/opt/homebrew/bin/clojure
➜ git:(main) ✗ which clojure-lsp
/opt/homebrew/bin/clojure-lsp
So, it looks like both clojure
and clojure-lsp
(even though this shouldn't matter since it sounds like the executable is bundled in the plugin) are on the path. I've also tried adding export PATH=$PATH:/opt/homebrew/bin
to my .zprofile
since I know IntelliJ has some issues with locating items on the shell path (items from .zshrc
, but that didn't work.
This seems related to https://github.com/clojure-lsp/clojure-lsp-intellij/issues/26(same underlying cause?). Anyone have any ideas as to how to get this working? Thanks!Small note to whoever invokes the CLI: -S options go before -A. This isn’t the fix for your problem, just something that should be adhered to to prevent other problems
➜ git:(main) ✗ clojure -A:test:dev -Spath
test:dev:src:resources:/Users/mbastian/.m2/repository/buddy/buddy-core/1.11.423/buddy-core-1.11.423.jar:/....lots more stuff
That also works. I'm still wondering if it has to do with how IJ computes the underlying path.
FYI, I'm on a M3 with the latest Sonoma OS.Well, I honestly have no idea whether the fix was to launch once from the command line and let the settings dialog populate from there or to set the PATH in a .zshenv
file. I uninstalled the plugin to try to reproduce the failure mode, but when I reinstalled it everything still works. So, if anyone happens to have this issue, the solution is either to run from the command line once for a successful config or to add the brew path to .zshenv
. I'm leaning towards the first one being the solution.
@U0JUR9FPH thanks for the test, this is the most critical bug I would like to fix it, I tried multiple things to fix that out of the box without success, there is a whole complexity how that works for Intellij, but if you found way to fix it, please let's create a FAQ or troubleshooting section so we can explain that.
The reason you cannot reproduce is because the analysis is cached after a successful run, if you rm -rf .lsp/.cache
you will manage to repro again
Starting Intellij from the CLI is the current workaround, but I would like to have something better, like a .zshsomething change or even better a fix in the plugin although I don't think its possible
Thanks for the tip on rm -rf .lsp/.cache
. I’ll do that then give it another try sometime today.
@UKFSJSM38, do you know how I might completely reset the clojure-lsp-intellij plugin? I tried that rm -rf .lsp/.cache
in my project after uninstalling the plugin completely. After restarting the plugin I get the following dialog and a hung background task saying "LSP: Initializing."
Here's the hung task:
Hmm, I also tried relaunching with ~/Applications/IntelliJ\ IDEA\
as well as opening a different project in case there was some kind of stale state. No matter what I try I can't get the LSP server to start.
Ok, looking at https://github.com/clojure-lsp/clojure-lsp-intellij/issues/25 now. I suspect that's my startup issue. I hadn't realized lsp was incompatible with Cursive. That might be it.
Ah yeah, it's really incompatible with cursive (we are working on https://github.com/afucher/clojure-repl-intelli for the repl part), but I'm not sure the initializing issue is related with that, it's a high prior for me, but don't how why it happens (you are the second person with that), maybe it's something with Intellij Ultimate :thinking_face: I only have community to develop
Hey @U0JUR9FPH, I'm still trying to fix https://github.com/clojure-lsp/clojure-lsp-intellij/issues/26 but no luck, I'd like to know if the .zshenv change you did solve the problem or if you are having any other problem yet with latest plugin version
I was never able to get past that initialization task so I couldn't get to where I could try it out.
@U0JUR9FPH Did you manage to get the logs I mentioned https://clojurians.slack.com/archives/CPABC1H61/p1705163024713489?thread_ts=1704570552.616949&cid=CPABC1H61?
Let me give it another run -- probably this evening.