This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-29
Channels
- # announcements (6)
- # babashka (7)
- # beginners (24)
- # calva (2)
- # cider (21)
- # clj-kondo (49)
- # cljdoc (29)
- # clojure (56)
- # clojure-dev (2)
- # clojure-europe (15)
- # clojure-nl (6)
- # clojure-norway (27)
- # clojure-uk (3)
- # clojuredesign-podcast (6)
- # clojurescript (1)
- # conjure (1)
- # core-async (8)
- # cryogen (2)
- # cursive (6)
- # data-science (1)
- # datomic (12)
- # events (1)
- # fulcro (16)
- # graalvm (28)
- # hyperfiddle (2)
- # lambdaisland (4)
- # leiningen (20)
- # observability (1)
- # off-topic (24)
- # pathom (5)
- # pedestal (10)
- # portal (7)
- # practicalli (1)
- # reitit (5)
- # rewrite-clj (20)
- # shadow-cljs (18)
- # vim (8)
- # xtdb (9)
when i do a cider-inspect
it sometimes brings my cursor from where it was, to the top of the currently file. As you can see in this video:
My only guess is that it's related to trying to bring the cursor to the top of the cider inspect buffer.
I think I get what you're saying although I can't see it (I'm used to a larger font) Feel free to create an issue
This only (cider inspect last sexp not opening a new buffer but putting the cursor at the top of the current screen) happens on my main computer (operating system is ubuntu) and not my mac. Same emacs.d and spacemacs init file, i installed emacs a different way though. I wish it was easier for me to re-install emacs, but i did a native compile this timei and i'm even less sure how to mess with it now 🙂 .
I have a question regarding clj-refactor
(hope this is the right place to ask): clean-ns
will wrap around requires when they exceed a certain line length. Can this length be configured somewhere?
Ah, great, thanks!
While trying this out just now I noticed that clean-ns
will only reformat if it had something else to clean up as well.
So I had to swap some entries to make it sort them again and only then it would also apply the new formatting
Could be considered a bug? If so, I can file a ticket
I see, that happens because refactor-nrepl handles the ns form as a traditional data structure (unaware of whitespace). Probably we don't refactor that, particularly as there's a variety of formatters for the ns form
I use refactor-nrepl and how-to-ns from the repl Another effective stack is clojure-lsp used as a cli tool
Hm I don't follow - are you saying that the reformatting isn't applied by refactor-nrepl
but by something else? I only have cider, clojure-mode and clj-refactor enabled
and paredit
clj-refactor uses refactor-nrepl (just like cider uses cider-nrepl) so in refactor-nrepl, that Clojure code just sees a data representation of your ns, so if what's to be fixed is whitespace only, it can't see it and nothing will be fixed
We could introduce an option for refactor-nrepl to always return something, maybe comparing with equal
Elisp-side for avoiding a useless replacement.
Doesn't sound like a lot of work - would you be interested in a PR?
Right, that's what I was thinking! So does the replacement (and thus reformatting) of the form happen in clj-refactor then? And the issue is that refactor-nrepl just doesn't hand us anything back since it doesn't detect any structural changes?
I can give a PR a shot, yep