This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-03
Channels
- # announcements (12)
- # babashka (36)
- # beginners (126)
- # calva (26)
- # cider (10)
- # clj-kondo (71)
- # cljdoc (3)
- # cljsrn (2)
- # clojure (232)
- # clojure-australia (1)
- # clojure-europe (11)
- # clojure-france (20)
- # clojure-nl (4)
- # clojure-norway (1)
- # clojure-serbia (4)
- # clojure-uk (6)
- # clojurescript (62)
- # conjure (5)
- # cursive (12)
- # data-science (1)
- # datomic (57)
- # deps-new (1)
- # duct (3)
- # emacs (5)
- # events (8)
- # fulcro (6)
- # graalvm (5)
- # helix (3)
- # jobs (6)
- # jobs-discuss (3)
- # kaocha (4)
- # lsp (128)
- # malli (12)
- # missionary (22)
- # off-topic (1)
- # pathom (7)
- # polylith (27)
- # quil (1)
- # re-frame (20)
- # react (9)
- # reitit (12)
- # releases (8)
- # remote-jobs (3)
- # sci (3)
- # shadow-cljs (9)
- # spacemacs (10)
- # tools-deps (7)
- # vim (7)
- # xtdb (14)
I understand that there is a way for calva's linter (clj-kondo) to understand macros from reframe and other libraries, but I am not sure how!
It's pretty straightforward: https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#unrecognized-macros
Thanks, this worked for me
./.clj-kondo/config.edn
{:lint-as {day8.re-frame.tracing/fn-traced clojure.core/fn}}
But I had to restart VScodeI noticed the same thing.. that I had to restart vscode before similar configuration got applied. Is that a bug or feature/limitation? Any idea, @UKFSJSM38 ?
I see. And that can currently only be achieved by restarting vscode, right?
I believe I saw some discussion about that recently.
Yeah, but that support is for .lsp/config.edn changes, for clj-kondo configs probably that will not be entire true
Actually depending on your clj-kondo config, it will work for next kondo run, editing a file or reloading the window
It didn't for me in recent past. Is there any scenario to retest?
I can replicate that behavior still. @U01LFP3LA6P as a small example for a macro that would be linted wrongly is
(defmacro my-> [& body]
`(-> [email protected]))
(my-> 1 (inc))
The (inc)
will be showing an error by kondo.
If I add the lint-as in the config.edn, close the file with the macro usage and reopen it the error is gone.the error is gone when kondo run again which happens: • you edit the file • you close/re-open the file • you restart clojure-lsp, via reloading vscode windows or restarting vscode
I remember that httpkit's get macro forced me to restart calva after change to clj-kondo's config file. IMO it's just a small annoyance, but getting the config right is tricky as your feedback loop is broken.
Editing and/or closing of the affected file did bot help in my case
if you changed something related to a external lib like http-kit, so probably you need to restart clojure-lsp indeed
I just tried out
- it works but on any evaluation it always outputs the whole "request" (I don't know exactly where from). Did somebody already encounter that?
Is there a way to make it so that when a namespace is loaded into the Calva Repl, every spec is automatically run through spec.test.alpha/instrument? I'm looking into spec.alpha and am looking for nice ways to integrate it with my development.
There isn’t. You can run custom code on demand, though: https://calva.io/custom-commands/