Fork me on GitHub
#emacs
<
2022-10-05
>
J10:10:00

Hi guys! I have some trouble to configure clj-kondo and emacs with use-package (see: https://clojurians.slack.com/archives/CHY97NXE2/p1664955578510879)

rolt11:10:58

i'm not sure i understand the problem. clj-kondo-clj is properly configured. Do you want both clj-kondo-clj and clj-kondo-edn ? from the name i'd quess clj-kondo-edn should only run on .edn files. Is there a problem when you enable flycheck-mode ?

J11:10:24

Sorry for the explanation. In fact, clj-kondo error and warning are not reported in the current buffer.

rolt11:10:31

i'm not sure i understand, have you tried enabling flycheck-mode ? M-x flycheck-mode or M-x global-flycheck-mode

J11:10:31

Ok M-x flycheck-mode works! Thanks @U02F0C62TC1. But when I restart emacs with this configuration. flycheck-mode still disabled

ericdallo11:10:38

You may be interested on setting up lsp support which already has clj-kondo built-in on clojure-lsp: https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/

upvote 1
rolt11:10:45

flycheck-mode will enable in it a single buffer, global-flycheck-mode will enable it for every buffer for instance to enable it after init:

(use-package flycheck
  :config (add-hook 'after-init-hook 'global-flycheck-mode))
but you could also use something like:
(use-package clojure-mode
  :config (progn ... (add-hook 'clojure-mode-hook 'flycheck-mode)))

rolt12:10:26

true, lsp has it and a lot more ! ❤️

❤️ 1
J12:10:14

Thanks @UKFSJSM38 and @U02F0C62TC1. clojure-lsp can be used with cider ?

ericdallo12:10:15

I mention on that guide, lsp == static analysis, like IDE features while cider == runtime, repl features

ericdallo12:10:35

I use it daily for years both together

ericdallo12:10:17

https://clojure-lsp.io/features/you will find all lsp features supported

J12:10:47

Ok got it! I will then try clojure-lsp 🙂 Thanks @UKFSJSM38 for your explications.

ericdallo12:10:38

No problem, happy coding!

borkdude13:10:57

@UHZPYLPU1 Glad to see your problem is solved. If there's anything that would be helpful to add to flycheck-clj-kondo's README, feel free to submit a PR.

J13:10:13

@U04V15CAJ yes, I wanted to do this 🙂 for the plain install with flycheck (without lsp). @UKFSJSM38 convinced me to try clojure-lsp

borkdude13:10:34

He always does :)

borkdude13:10:57

For the record, I'm also using clojure-lsp, clj-kondo is an integral part of that

ericdallo13:10:11

haha sorry for that

borkdude13:10:26

no problem: clojure-lsp rocks :-)

❤️ 2
borkdude13:10:17

I get a 404

Benjamin13:10:02

Yea now it is back

borkdude13:10:20

Cool! Also want to share it in #news-and-articles?

Benjamin13:10:52

I wasn't sure because it is quite emacs specific

Drew Verlee03:10:16

@U02CV2P4J6S that was an interesting read (i got most of the way through...) i had some things not work for me mid way and i'm not sure why.

Benjamin08:10:58

@U0DJ4T5U1 if you feel like it you can post me your errors