This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-11
Channels
- # aleph (7)
- # announcements (5)
- # beginners (58)
- # calva (20)
- # cider (10)
- # clj-kondo (4)
- # cljfx (5)
- # cljsrn (7)
- # clojure (29)
- # clojure-europe (11)
- # clojure-mexico (1)
- # clojure-norway (26)
- # clojure-uk (9)
- # clojurescript (1)
- # cursive (31)
- # datahike (22)
- # datomic (12)
- # duct (3)
- # fulcro (28)
- # helix (35)
- # hyperfiddle (28)
- # lsp (4)
- # malli (8)
- # midje (3)
- # music (2)
- # nbb (9)
- # nrepl (20)
- # off-topic (36)
- # polylith (3)
- # shadow-cljs (47)
- # sql (2)
- # testing (7)
- # vim (17)
- # xtdb (7)
Is there an easy way to rename a keyword project-wide without messing up indents? Also taking into account namespace aliases and destructuring.
I'm not sure exactly how to test that from the CLI, but when I try using the rename functionality in my Neovim I get inconsistent results: For example:
(let [{:foo/keys [bar]} {:fo|o/bar 1}]
bar)
produces:
(let [{:foo/keys [baz]} {:foo/baz 1}]
bar)
The bindings in the let form are updated, but the change introduces an undefined var in the let body this way. The end result is broken code. If it produces changes like this I think it's safer to go through and make the substitutions manually.
I think I've seen cases where it doesn't keep the right indentation as well. Maybe it's conflicting with my rust-parinfer or something? I wonder if this is one of those operations for which it's better to disable parinfer.
Hmm, I think I'm on latest. I'll double check when I get back to my machine. Thanks for taking a look @U0BBFDED7.