Fork me on GitHub
#spacemacs
<
2021-03-14
>
zendevil.eth07:03:45

@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:

practicalli-johnny11:03:42

@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.

zendevil.eth11:03:38

@jr0cket I do not see the underscore nor the message

practicalli-johnny11:03:51

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

practicalli-johnny11:03:04

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

zendevil.eth11:03:16

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

practicalli-johnny11:03:20

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

practicalli-johnny11:03:20

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

zendevil.eth11:03:21

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

zendevil.eth11:03:46

I don’t know what lsp is or does

practicalli-johnny11:03:08

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

practicalli-johnny11:03:55

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, `http://0.300.xxx 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

zendevil.eth11:03:09

how do I upgrade it?

practicalli-johnny11:03:14

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

practicalli-johnny11:03:34

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

practicalli-johnny11:03:23

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.

zendevil.eth11:03:04

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

👍 3
practicalli-johnny12:03:20

Now you are on Spacemacs 0.300, then updating Spacemacs is via Git. I use Magit. There is a guide to updating here https://practicalli.github.io/spacemacs/install-spacemacs/update.html 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

practicalli-johnny12:03:45

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