Fork me on GitHub
#lsp
<
2022-07-01
>
emilaasa09:07:39

I have a couple of projects (multiple project.clj files in different folders) that are developed as separate libraries. When developing some of the common libraries, I'd like to have "Find references" and "jump to definitions" work for usages in multiple projects. Is there a way to configure LSP to do that?

jmayaalv09:07:01

Give :source-paths in .lsp/config.edn a try

jmayaalv09:07:20

https://clojure-lsp.io/settings/

:source-paths	project-local directories to look for clj/cljc/cljs files, if using deps.edn, project.clj or bb.edn, use :source-aliases instead.	#{"src" "test"}

ericdallo11:07:48

☝️ Also, if they are under a common folder, I suggest having a root project.clj with an dev alias which would bring all lib source paths, then you can use clojure-lsp on that project root only

emilaasa12:07:22

Ah that could be a clean solution.