Fork me on GitHub
#spacemacs
<
2020-04-18
>
dgonsalves2217:04:08

having a hard time with getting clj-kondo working. I got

(defun dotspacemacs/user-config ()
  (use-package clojure-mode
    :ensure t
    :config
    (require 'flycheck-clj-kondo))
  )
and
dotspacemacs-configuration-layers
   '(
   ...
     (clojure :variables
              clojure-enable-linters 'clj-kondo))
and clj-kondo is in usr/local/bin

jr0cket17:04:35

@dgonsalves22 you only need one of those configurations

jr0cket17:04:14

The first is if you are using Spacemacs 0.200 (master), the second block is for Spacemacs 0.300 develop

dgonsalves2217:04:21

so im using master and changed it to just the first one above and it still doesnt work

jr0cket17:04:30

If you have the syntax-checking layer installed and have restarted Emacs, then I am not sure

dgonsalves2217:04:28

flycheck-clj-kondo is in package-selected-packages and dotspacemacs-additional-packages

dgonsalves2217:04:49

syntax-checking is installed.

dgonsalves2217:04:35

the only thing from instructions I was fuzzy about was making sure kondo was on PATH. I gotta admit I’m kinda new at this and am having a really hard time understanding that part even after reading up on it

jr0cket17:04:52

If you can open a terminal and type clj-kondo and it works, then check that path has been picked up by Emacs using SPC SPC getenv

jr0cket17:04:28

then select PATH and it will show in the minibuffer....

jr0cket17:04:02

If you have added a directory to the path after running emacs, it will only pick the new path up after restarting emacs.

dgonsalves2217:04:46

/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Racket/bin/racket:/Applications/Racket/bin:/applications/racket/bin:/Applications/racket/bin:/opt/X11/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/3.7/bin

dgonsalves2217:04:05

lol i dont know why racket is on there so many times

jr0cket17:04:25

I guess that means you are using MacOSX 🙂

jr0cket17:04:03

so if you run which clj-kondo is that on one of the paths you pasted above?

dgonsalves2217:04:44

/usr/local/bin/clj-kondo yes

jr0cket17:04:19

Okay, so then its Spacemacs that is the issue. Can you share your .spacemacs file? for example, if you have the github layer installed, you can do SPC g g b to create a gist from the current buffer. Or just copy it manually into gits or pastbin or similar - make sure you didnt put anything secret in there :)

dgonsalves2217:04:53

maybe its time to switch to develop?

jr0cket17:04:59

I havent use Spacemacs 0.200 for a long time, more than two years. I do recommend using develop https://practicalli.github.io/spacemacs/install-spacemacs/switch-to-develop.html

spfeiffer17:04:36

Doesn't need the spacemacs env file to be edited manually to pick up new path entries?

spfeiffer17:04:52

Does restarting suffice?

spfeiffer17:04:38

I am still confused by the new env var handling.

dgonsalves2217:04:00

yea that is it probably it. I just got my first dev job and I quickly noticed that when I do screen-shares that everyone elses spacemacs runs a lot better. bet they are using develop branch

jr0cket17:04:01

FlavaDave is on master, there is no spacemacs.env file 🙂

spfeiffer17:04:49

OK, missed that.

spfeiffer17:04:18

I cannot recommen sticking to master at all.

jr0cket17:04:35

@dgonsalves22 if you are feeling lazy, you can reinstall Spacemacs develop using my install guide. Two git clones and you are finished , just delete the .spacemacs and .emac.d directory before you start. https://practicalli.github.io/spacemacs/install-spacemacs/

spfeiffer17:04:41

@dgonsalves22 the develop branch is lightyears ahead of master. IMHO, develop should be the default by now 😉

dgonsalves2217:04:52

@spfeiffer restarting (machine and spacemacs) did not suffice

dgonsalves2218:04:16

@jr0cket I’ll switch to develop using your guide. You were the whole reason I wanted to try Kondo in the first place. :rolling_on_the_floor_laughing:

jr0cket18:04:22

Borkdude must take most of the credit for that though, but thanks for the compliment. I really dont know how I wrote Clojure without clj-kondo