This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-08
Channels
- # announcements (40)
- # babashka (14)
- # babashka-sci-dev (7)
- # beginners (50)
- # calva (8)
- # cider (25)
- # clj-kondo (7)
- # cljdoc (8)
- # cljs-dev (14)
- # clojars (6)
- # clojure (56)
- # clojure-australia (1)
- # clojure-berlin (2)
- # clojure-dev (16)
- # clojure-europe (18)
- # clojure-nl (1)
- # clojure-norway (5)
- # clojure-uk (7)
- # clojurescript (100)
- # cursive (57)
- # data-science (9)
- # datomic (6)
- # emacs (11)
- # figwheel (2)
- # fulcro (14)
- # helix (2)
- # hyperfiddle (9)
- # introduce-yourself (1)
- # lsp (20)
- # malli (14)
- # meander (34)
- # minecraft (1)
- # missionary (8)
- # off-topic (37)
- # pedestal (4)
- # polylith (18)
- # portal (3)
- # re-frame (5)
- # ring (33)
- # shadow-cljs (32)
- # spacemacs (6)
- # vim (16)
has anyone perhaps found a way to script with clj-refactor's jvm-side middleware? we'd love to run all our code through cljr-clean-ns on-pre-commit. wondering if anyone has done any work in this direction
Well, then it is the LSP-organize-imports equivalent which takes into account clj-kondo
unfort the lsp impl doesn't do as good a job as cljr does when it comes to .cljc files
you're right though, that would have been ace
my colleague @U0HJ7CX6H will file an lsp issue about it at some point 🙂
not sure if you're joking haha
i half considered just calling the emacs binary to do the thing 😄 clojure-lsp almost does the right thing, but struggles with namespace reader conditionals, specifically ones that don't use splicing but rather two different require sets for clj and cljs
hi, refactor-nrepl (clj-refactor's backend) maintainer here 👋 refactor-nrepl is a vanilla clojure library which you can simply invoke however you please. https://github.com/clojure-lsp/lein-clojure-lsp and similar do a nice job as well refactor-nrepl is accurate indeed, but the formatting is a bit wacky for .cljc files. What I do in my daily workflow is run refactor-nrepl first, then a formatter of choice (I happen to use https://github.com/nedap/formatting-stack but anything will do)
wow didn't know about formatting-stack!
this is amazing
formatting-stack looks amazing! thank you @U45T93RA6
Cheers 🍻 It's quite underpromoted (even though @UHJH8MG6S and me keep it alive), we have some finishing touches pending (like an easier CI setup)
Thanks for sharing formatting-stack. I wanted to try it on our repo but just (require '[formatting-stack.core]) caused a huge CPU usage spike (800% for minutes until I killed the REPL)
@U06BE1L6T probably it's the cost of running clj-kondo analysis in a project for the first time (which is done here https://github.com/nedap/formatting-stack/blob/8b0482d95d22628eeb8991d8503268b650089c17/worker/formatting_stack/background.clj)
I always run f-s in all projects I work on / open (I have dozens of random clones, besides from work) - it doesn't have a generalized perf issue - much the opposite. Perhaps your project is particularly large?
It's not a huge project but it is a bit larger.
I simply ran (format!)
.
How does it decide what to analyze?
first prize would be with babashka but normal jvm options are worth trying too 😄