Live linting with clj-kondo
clj-kondo is a linter that can be called from flycheck, providing live static code analysis on your Clojure code as you type. Simple open any Clojure file (
.edn) and start typing. clj-kondo does not need a running Clojure REPL to work.
When errors are detected by the linter a red dot appears in the margin showing the line. A red underscore shows where on the line the issue is. Moving the cursor to the underscore will show a pop-up describing the error.
The total number of errors and warnings are show in in the Space bar.
Add spacemacs specific images
syntax-checkinglayer is present in
dotspacemacs-configuration-layers, which provides flycheck.
clj-kondois available on PATH (see clj-kondo install instructions).
developbranch as of September 2019 or later
Configure Spacemacs Clojure layer with clj-kondo
Add a variable called
clojure-enable-linters to the
clojure with the value 'clj-kondo.
dotspacemacs-configuration-layers '(... (clojure :variables clojure-enable-linters 'clj-kondo) )
SPC q r to restart Spacemacs (or simply
SPC f e R to reload the configuration)
This configuration approach for clj-kondo is broken if you also include the unofficial
clojure-lint layer that can provide Joker. clj-kondo has superseded joker in functionality.