Fork me on GitHub
#spacemacs
<
2020-04-18
>
FlavaDave17: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

practicalli-johnny17:04:35

@dgonsalves22 you only need one of those configurations

practicalli-johnny17:04:14

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

FlavaDave17:04:21

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

practicalli-johnny17:04:30

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

FlavaDave17:04:28

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

FlavaDave17:04:49

syntax-checking is installed.

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

practicalli-johnny17: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

practicalli-johnny17:04:28

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

practicalli-johnny17: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.

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

FlavaDave17:04:05

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

practicalli-johnny17:04:25

I guess that means you are using MacOSX 🙂

practicalli-johnny17:04:03

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

FlavaDave17:04:44

/usr/local/bin/clj-kondo yes

practicalli-johnny17: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 :)

FlavaDave17:04:53

maybe its time to switch to develop?

practicalli-johnny17: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.

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

practicalli-johnny17: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.

practicalli-johnny17: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 😉

FlavaDave17:04:52

@spfeiffer restarting (machine and spacemacs) did not suffice

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

practicalli-johnny18: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