Fork me on GitHub
#lsp
<
2023-05-02
>
Akiz13:05:11

Hi folks, I see that clojure-lsp should respect {:style/indent 2} meta on macro but when i save file with eglot-format-buffer , it formats it with indent 1. I am on the latest clojure-lsp, I have got no conflicting settings in my project/.cljfmt.edn .

ericdallo13:05:04

• Is your macro from your project? (just out of curiosity as I'm investigating a similar issue) • could you try remove .lsp/.cache, restart lsp and try again? (also investigating a issue on that feature)

ericdallo13:05:30

I just tested with a local macro and it works, would need more details in a repro if my suggestion doesn't work

Akiz13:05:20

It is this one https://github.com/metosin/compojure-api/blob/master/src/compojure/api/core.clj i will try to delete .lsp/.cache once i get back to my computer and let you know if it helped 😉

👍 2
ericdallo13:05:16

ah so it's an external macro right? not from your project? it's probably the issue I'm aware of, please open an issue so I can prioritize that

👍 2
ericdallo14:05:04

thanks, it should be easy to fix but need tests as well, will work on that this week probably

dharrigan18:05:36

Does clojure-lsp support jumping to definition for a project (src) defined as a :local/root {"../foo"} where foo contains a src directory with clj files?

dharrigan19:05:02

For currently, it doesn't seem to work for me from project A to project B (with project B defined as a :local/root)

ericdallo19:05:49

works but probably needs a configuration, clojure-lsp is a project that uses :local/root

root
- lib
- cli
like a mono-repo

ericdallo19:05:07

you just need to confirm if source-paths are correct, checking server-info is a start

dharrigan19:05:08

kk, will do 🙂

dharrigan19:05:29

Interestingly, it only seems to work for me if I remove :paths ["src" "resources"] from my Project A deps.edn

ericdallo20:05:31

I need more info about the project, like the deps.edn, the aliases, clojure-lsp has a good default and a lot of logic to find source-paths as explained https://clojure-lsp.io/settings/#source-paths-discovery

dharrigan20:05:59

Thank you. I'll have a play around, for now I put it back again and it works (perhaps the db needed to be recreated...not sure, but not for worrying this evening)

ericdallo20:05:46

👍 probably is not a cache issue, most likely a misconfiguration