Fork me on GitHub

I have a project that clojure-lsp just does not work well on, it takes forever to start up and respond to requests. I use Cider and love it and would be happy enough with it alone but I'm trying out all of my options. Assuming I can't figure out how to make clojure-lsp more performant, will using ctags be meaningful on top of using Cider? I tried universal-ctags but the default clojure tag generation didn't work for me. Is it worth digging into?


Have you tried consulting #lsp regarding the performance problems?


If you want to debug the performance problem, perhaps try to run the clojure-lsp and clj-kondo binaries directly on your source code (without emacs) and provide some debugging diagnostics for #clj-kondo and #lsp (depending where you think the problem lies). I've found clojure-lsp (with clj-kondo integration) to provide a lot of linter help while writing code to make it an essential dev tool at this point.


Thanks! I did run clojure-lsp diagnostics and found it took about 15 minutes to run. I'll look into what kind of information #lsp finds useful and see if I can get it. I have been able to use clj-kondo via flycheck-clj-kondo to get linter help.


15minutes sounds a lot, please ask on #lsp We are improving performance a lot during releases and we even have one at master right now, so trying a #clojure-lsp-builds may help check if the issue is gone already


I didn't find ctags worth the effort for Clojure. There isn't much support for the language it seems and I didn't manage to create a reliable config. Clojure-LSP can take time if there are large data files to analyse (e.g. data analysis/science related projects), so the slowness of LSP may be project specific. Try clojure-lsp on a very simple (new) project and see if there is a performance issue with LSP in general or just a specific project. There is a lot of cross-over between CIDER, clj-refactor and Clojure-lsp. I disabled a lot of LSP and a bit of Cider and dropped clj-refactor a long time ago.


I'm sure it's project specific, I've had no issues on my personal projects but a particular giant monorepo causes issues. I'm about to try excluding sections of the repo and see if it gets better. I'll go to #lsp if I can identify specifics.


I'm not sure that CIDER plays nice with ctags. It uses its Clojure's source information for var information. I highly recommend clojure-lsp in addition to CIDER. I think you can make CIDER use its own navigation (which is a bit better for dynamic vars) and use clojure-lsp as a fallback

👍 2