Fork me on GitHub
#clj-kondo
<
2022-10-05
>
J07:10:38

Hi guys! I don’t understand why clj-kondo is disabled here (emacs). I follow the use-package installation. The flycheck-verify-setup give me this:

borkdude07:10:11

And if you do flycheck-select-checker?

borkdude08:10:07

And have you tried doing what flycheck says at the bottom?

J08:10:55

Yes. I got No syntax checkers disabled in this buffer

borkdude09:10:46

have you tried restarting emacs?

J09:10:57

My config for clj-kondo. (I have (setq use-package-always-ensure t))

borkdude09:10:52

What is the file extension of this buffer?

J09:10:43

My config is the init.el . All other screens are made on a .clj file.

borkdude09:10:51

What do you see when you run flycheck-compile

borkdude09:10:54

in the buffer

J09:10:04

Seems work

J09:10:43

But I don’t have warning in the buffer.

borkdude09:10:15

Yeah, strange. I'm not really familiar with use-package, so perhaps try #emacs What you could also do is manually do (require 'flycheck-clj-kondo)

borkdude09:10:37

and perhaps flycheck-select-checker and then select clj-kondo

borkdude09:10:07

is it possible you are also using lsp-mode?

J10:10:55

I not use lsp-mode . I will try your recommendation.

J10:10:32

I don’t have clj-kondo in checkers but clj-kondo-clj , clj-kondo-cljs, etc... It’s ok?

J10:10:58

I will ask to #emacs too.

borkdude10:10:05

yes, there is one checker for each file type

👍 1
borkdude11:10:19

I'm on schedule for the planned release today: just one more issue... https://github.com/clj-kondo/clj-kondo/projects/1 (see high priority column)

🚀 3
🎉 2
borkdude 1
borkdude15:10:13

CI is building 2022.10.05 now...

Ella Hoeppner21:10:04

I've got a macro that takes in a list of symbols and returns a do expression containing a defonce for each those symbols. This causes red squiggles with an Unresolved symbol warning for those symbols both inside the call to the macro and everywhere else those symbols are referred to in the file. I can fix the warnings inside the macro call with def-catch-all, but that does nothing for the warnings in the rest of the file. Is there anything I can do to make this work?

borkdude22:10:19

Hi! I think you could write a hook for this macro: https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md A (hopefully) gentle introduction: https://github.com/clj-kondo/hooks-workshop-clojured-2022 tl;dr: the :macroexpand hook allows you to more or less copy your macro to your configuration and is probably the least amount of effort. The :analyze-call macro allows you to do more and with more accuracy but might be overkill for your macro which just defines vars.

borkdude22:10:02

It's getting late here, but I'll check in tomorrow again.

borkdude07:10:15

Hope you were able to get something going

Ella Hoeppner16:10:56

yep, :macroexpand was exactly what I needed, thanks!