Fork me on GitHub

@jr0cket you mentioned that adding the lsp layer would automatically add clj-kondo. That’s why I added the

(lsp :variables lsp-lens-enable t)
in spacemacs configuration layers. However, I don’t think the linting is happening. Here’s my .spacemacs file:


@ps The lens variable only shows how many places a function is called. It's not connected to linting. If you type (defn [] ) it should underscore that text and when you move the cursor over the underscored text then the error message shows.


@jr0cket I do not see the underscore nor the message


Your .spacemacs config has LSP, Clojure layer config to add clj-kondo and additional packages that adds flycheck-clj. This is a lot of duplication, so you should remove most of that config


If you do not use LSP already, then remove it. LSP does require quite a lot of additional configuration, especially if you are used to the way Cider works


I had the :variables clojure-enable-linters ’clj-kondo even before I added (lsp :variables lsp-lens-enable t), but clj-kondo wasn’t working


If you are using LSP, you can either disable it for Clojure or remove this Clojure configuration variable clojure-enable-linters 'clj-kondo and the additional-packages packages


It seems you are using LSP for python. Do you want to use LSP for Clojure?


okay I removed (lsp :variables lsp-lens-enable t), and I’m back to where I was before


I don’t know what lsp is or does


If you dont know what LSP does, then I'll assume you dont need it for Clojure. This simplifies things


Please confirm you are using Spacemacs develop branch. On the Spacemacs home buffer, SPC b h in the top right corner is should have a version number, ` where xxx is the version of emacs you are using. If this version is 0.200 then clj-kondo will not work, but I can show you how to upgrade


how do I upgrade it?


It is recommended that you use Emacs version 26.3 or 27.x (any version of 27)


You can either update your existing configuration, or take a backup of your .spacemacs config and start from scratch


There are a few steps that should be done, but they only need to be done once. Feel free to ask any questions if its not obvious.


@jr0cket thanks. I was able to upgrade and now clj-kondo works!

👍 3

Now you are on Spacemacs 0.300, then updating Spacemacs is via Git. I use Magit. There is a guide to updating here Suggest only updating Spacemacs if you know there is a feature you need or a bug fix. Updating packages is the same as version 0.200


You may find a few new keybindings or some slight changes to key bindings, as you have just added over 2 years of updates to Spacemacs