Fork me on GitHub

@lvbarbosa Well, it’s certainly doable as evidenced by the tools that exist. I think today you have 3 options - clj-kondo, clojure-lsp and clj-refactor. I like kondo, as it doesn’t require any extra setup from me, but I’ve heard good things about clojure-lsp and clj-refactor. Unused vars are not hard to implement in CIDER itself, I just never had the time for this.


Might be a nice experiment. bozhidar: do you think it's possible without any additional elisp? I looked at squiggly-clojure and it provides an elisp package


We’ll also need a bit of Elisp for the UI, but that should be trivial. It’d be really great if we had something like squiggly-clojure for kondo, that’s using middleware instead of just evaluating code, so it would return data that’s optimized for the Elisp clients. That can expand the usefulness of kondo to more than linting - e.g. you can directly expose the data needing for find-usages, bake project integration, etc.

Lucas Barbosa16:11:00

Gotcha... I am scheduling some time for myself in the future to study Clojure tooling internals. I might be able to contribute afterward


Couldn't we make clj-kondo in Emacs rely on projectile's notion of projects to perform linting? Or maybe make clj-kondo project.clj aware?


How slow is it to have clj-kondo do full project linting? We talking unbearably slow? Or, won't really notice slow?


Depends on how large your classpath is. Clj-kondo lints some projects in CI: clojure itself, clojurescript itself + some libs, this takes about 10 seconds


Hum.. does IntelliJ and co achieve better speed by being long lived process? As I understand, kondo would do a full lint all the time. But I think IntelliJ for example keeps a full AST of Java at all times and as things are changed, it partially update that AST and only perform analysis related to the changes.


yes, it's the difference between a server that can accumulate state and a binary which is invoked once and lives very shortly.


but if clj-kondo is invoked as a library in a cider middleware you could achieve the same effect probably


Thanks for the info!!