Fork me on GitHub
#lsp
<
2021-06-14
>
ericdallo17:06:10

clojure-lsp Released https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.06.14-17.00.47 with a huge improvement on source-paths discovery for deps.edn projects 🎉 • clojure-lsp now detects if your project is a deps.edn project and scan for :paths, :extra-paths on deps.edn root level and on :source-aliases (configurable, default :dev and :test), building a source-path that should work for most (every?) deps.edn projects, even mono-repos like polylith 😄 Thanks @seancorfield and @brandon.ringe for raising this issue. Fixes https://github.com/clojure-lsp/clojure-lsp/issues/416 For more information, check the https://clojure-lsp.github.io/clojure-lsp/settings/#source-paths-discovery.

🎉 25
clojure-lsp 11
catjam 10
👏 10
pez18:06:48

Is there a way for consumers to tap in to this project detection?

ericdallo18:06:34

What do you mean? Calva be able to change something is your idea?

pez19:06:27

Rather for Calva to be able to use the information about the project.

ericdallo19:06:36

you mean the source-paths? I think it's possible already, via the server-info command, which should bring the :source-paths key with that info

pez19:06:11

I might mean the source-paths. 😃 Must think about it a bit.

ericdallo19:06:15

hum, actually only the source-paths manually informed from users are available via the server-info command, the auto resolved source-paths from clojure-lsp are not exposed, but we could do that if you think it would help Calva

bringe19:06:18

I'm not sure what @U0ETXRFEW has in mind, but if it will help with something, it could be a good idea.

pez06:06:17

The server-info command prints to an output channel afaiui? Calva can’t use that. What I am after is a way to inform Calva about the project structure. @U01PG2LDYV8 is working with adding a command that will let the user jump between test and implementation files, creating them if needed and requested by the user. It seems that if we have the source paths for the entire folder opened in VS Code we could use that for precision in guessing where files should go.

ericdallo13:06:58

The server-info returns an edn with multiple information, Calva just print that to user, but it doesn't mean Calva can request that command and use the value when it wants

pez15:06:47

OK. The way it is wired now I couldn’t see how it gets printed to the output channel so I assumed that happened on the server. I’ll have to look a bit closer. 😃

ericdallo15:06:40

Actually you are right, sorry I thought we were returning the info via the response, but we are using windowLog lsp method which LSP clients prints to output. We can create a custom command that returns the edn or json though