lsp

Harold 2026-01-02T04:04:51.203289Z

I am occasionally getting this weird minibuffer (see screenshot)

Harold 2026-01-02T04:06:09.798589Z

It's mostly happening when I navigate to files that I haven't opened in lsp before - this time I got the 'import' buffer for a brand new project, and I hit i, and then this came up. I don't know where it came from, or what it means. I don't see any other messages any other buffers.

Harold 2026-01-02T04:06:55.564149Z

'Retry' causes the minibuffer to blink, and nothing else to happen. Ignore makes it go away, still unsure what it was. 🙂

Harold 2026-01-02T04:08:21.084559Z

Here's an odd line in *lsp-log* unsure if related:

Cancelling textDocument/codeLens(2336) in hook after-change-functions

ericdallo 2026-01-02T17:48:55.714089Z

it's quite weird that it's not showing the message content, but it's a message mentioning that clojure-lsp didn't manage to analyze your classpath with lein classpath or clj -Spath

ericdallo 2026-01-02T17:49:26.975679Z

you should fix it and not ignore probably otherwise you will face some clojure-lsp features not working like not being able to find dependencies etc

ericdallo 2026-01-02T17:50:30.017279Z

the message should look like: (it's weird your emacs not showing that)

Harold 2026-01-02T17:53:05.933669Z

Ah! Interesting. Yes. > clojure-lsp didn't manage to analyze your classpath with lein classpath or clj -Spath This makes sense because this brand new project only has shadow-cljs.edn (and does not use deps.edn or lein yet).

ericdallo 2026-01-02T17:53:36.905799Z

even so clojure-lsp supports that

Harold 2026-01-02T17:53:52.281709Z

oh, really. 🤔

ericdallo 2026-01-02T17:53:57.866659Z

https://clojure-lsp.io/settings/#classpath-scan

ericdallo 2026-01-02T17:54:30.971199Z

try npx shadow-cljs classpath in your project and check if it works

ericdallo 2026-01-02T17:55:17.596129Z

maybe what is happening is emacs is not finding npx binary because of how you start emacs (the PATH env etc), we would know that if we saw the error message in emacs :/

Harold 2026-01-02T17:55:19.848369Z

Good idea! That does print a classpath 👍

ericdallo 2026-01-02T17:55:59.440419Z

try starting emacs from terminal just to check if it works

ericdallo 2026-01-02T17:56:26.217509Z

because via terminal, emacs will inherit your shell PATH and find npx

ericdallo 2026-01-02T17:56:59.416479Z

another test: M-x eval-expression (executable-find "npx")

Harold 2026-01-02T17:57:05.828959Z

oh ya $ emacs shadow-cljs.edn works.

ericdallo 2026-01-02T17:57:44.185179Z

yeah, so the problem is your emacs is not using your shell envs etc (one of the biggest headaches that I like doom-emacs to fix it for me hehe)

ericdallo 2026-01-02T17:58:17.887359Z

I believe this is the canonical way these days to solve that: https://github.com/purcell/exec-path-from-shell

Harold 2026-01-02T17:58:19.800429Z

Totally believable. I have battled this area before.

ericdallo 2026-01-02T17:59:12.070139Z

I hate this problem, I spent so many hours fixing that for intellij when creating clojure-lsp-intellij

ericdallo 2026-01-02T17:59:40.980359Z

I found that this is more common for macos users as well as mac starts apps from its launch with a pretty empty sh shell

Harold 2026-01-02T18:00:00.202779Z

Also interesting, I'm now no longer in the state where it's broken? Perhaps because when it worked once it cached some data?

ericdallo 2026-01-02T18:01:12.225429Z

yes, it caches classpath until you change anything in your shadown-cljs.edn file or remove the .lsp/.cache folder

Harold 2026-01-02T18:07:40.036899Z

That's very cool. Thanks for your help, I'm off and running.

👍 1