Fork me on GitHub

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?


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


But the project cache should be used though


It should use the .lsp/.cache


You can confirm checking the logs or using --verbose


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.


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