Fork me on GitHub
#lsp
<
2021-11-13
>
amar20:11:55

hi everyone! Just started using clojure-lsp . I added it to a git pre-commit hook to format and clean-ns, but it seems to take a very long time even after the cache is built. Is there a way to specify only files that have changed or is this not the ideal use case?

ericdallo20:11:20

There is nothing you can do that will make the analysis faster unfortunately, we need to scan the project to make sure all analysis and actions clojure-lsp will take makes sense

ericdallo20:11:29

But the project cache should be used though

ericdallo20:11:41

It should use the .lsp/.cache

ericdallo20:11:51

You can confirm checking the logs or using --verbose

amar13:11:19

Thanks Eric. I do see the .lsp/.cache Might not be the best use case for a pre-commit hook since it's generally a longer run process.

ericdallo13:11:42

Yeah, even so, the only part that should take more time is the 95% (analysing source paths) which is the part clojure-lsp analyze your project code but uses the cache for the classpath