I bounce between a lot of projects at work and have been frustrated by Eglot's sluggishness, particularly around startup. So I'm https://clojurians.slack.com/archives/CPABC1H61/p1739270004658169?thread_ts=1738183329.457039&cid=CPABC1H61 to trying lsp-bridge. Having a much more positive experience this time, though the find-def that takes me into third party libs is still not working (https://github.com/manateelazycat/lsp-bridge/issues/1276). Here's hoping I can nerdsnipe a Pythonista to implement that for me 😅
I've been meaning to ask this every time this comes up; in what situations do you experience sluggishness? I've seen the complaint in general about LSP but I haven't encountered it (yet) myself. For example regarding the startup, I think 99% of the delay I experience is with clojure-lsp , which I imagine doesn't correlate with the choice of LSP client. Similarly when using xref and the LSP backend to jump around a large Clojure codebase; never encountered any slowness. Am I doing something wrong? 🙂
Sure, I've seen bunch of functional problems, like completions not working in lsp-mode or eglot not supporting code lenses. But I've never felt that the LSP client itself is slow, even though this seems like a common complaint.
Maybe you're holding it right, and I'm holding it wrong. I'm not an expert. 🤷
I just perceive eglot to be slow; taking many seconds to become active and responsive when I switch to a new project. lsp-bridge doesn't appear to have this issue. It may be perception only, but perception matters 🤷
with the projects I work with, clojure-lsp takes about 30+ seconds to initialize. So that sort of hides away any startup slowness in the client itself.
Thanks for that. I may come to that conclusion myself (again) yet.
At least for lsp-mode there is a variable called lsp-idle-delay which controls how much time lsp-mode process the messages, I set that for a really low value for Clojure-lsp 0.05 and works great
@lasse.olavi.maatta you were right that it seems to be clojure-lsp's startup-time that's taking the bulk of the time, and the lack of ability to jump into jars turned out to be too much. So I'm back at Eglot -- again 🙂 I've configured dumb-jump to handle a bit of xref until clojure-lsp starts up. 🤷
I can't see how eglot fix the ability to jump into jars, this is provided by clojure-lsp and both lsp-mode and eglot uses that AFAIK
Maybe I worded myself incorrectly...? With eglot (and lps-mode, but I haven't used that in a long time) jumping into jars works fine. This was the main feature missing from lsp-bridge that keeps making me come back to eglot.
In lsp-bridge that works for Java, but not for Clojure.
ah got it, yeah, clients need to impl some things and only eglot and lsp-mode did that
not hard to do I guess in lsp-bridge, maybe someone can try
I created a ticket, and the developer said he's happy to review/merge a PR. I don't know Python well enough to attempt a fix myself, and it's low priority for me since I'm back on Eglot 🙂
i know it would be slow, but is it possible to run clojure-lsp as a deps.edn -M alias?
Sure, I do nothing else
oh perfect, thank you