Before setting up your editor, see Project setup
on how to configure clj-kondo for your project. TL;DR: this involves creating
a .clj-kondo directory in the root of your project.
For integrating with Emacs, see flycheck-clj-kondo.
This section is for Vim 8+ or NeoVim
- Install ALE using your favorite plugin manager. This already has in-built support for clj-kondo.
- In your
.vimrc, add:to only have clj-kondo as the linter. add:let g:ale_linters = {'clojure': ['clj-kondo']}
to have both, with clj-kondo being preferred.let g:ale_linters = {'clojure': ['clj-kondo', 'joker']}
- Reload your
.vimrcand it should start working.
This section assumes that you are already using Cursive.
- Install the File Watchers plugin.
Repeat the below steps for the file types Clojure (.clj), ClojureScript (.cljs)
and CLJC (.cljc).
- Under Preferences / Tools / File Watchers click
+and choose the<custom>template. - Choose a name. E.g.
clj-kondo <filetype>(where<filetype>is one of Clojure, ClojureScript or CLJC). - In the File type field, choose the correct filetype.
- In the Program field, type
clj-kondo. - In the Arguments field, type
--lint $FilePath$ --cache. - In the Working directory field, type
$FileDir$. - Enable
Create output file from stdout - In output filters put
$FILE_PATH$:$LINE$:$COLUMN$: $MESSAGE$.


