This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-11-16
Channels
- # announcements (7)
- # babashka (8)
- # beginners (48)
- # calva (4)
- # cider (6)
- # circleci (2)
- # clj-commons (14)
- # clj-kondo (3)
- # clj-on-windows (7)
- # cljs-dev (34)
- # clojure (49)
- # clojure-dev (25)
- # clojure-europe (48)
- # clojure-losangeles (1)
- # clojure-nl (4)
- # clojure-norway (33)
- # clojure-uk (2)
- # clojurescript (37)
- # community-development (5)
- # conjure (17)
- # cursive (2)
- # data-science (1)
- # editors (10)
- # emacs (50)
- # events (22)
- # honeysql (11)
- # introduce-yourself (1)
- # jobs-discuss (13)
- # lsp (42)
- # malli (9)
- # off-topic (7)
- # pathom (11)
- # portal (5)
- # re-frame (3)
- # reagent (22)
- # reitit (8)
- # reveal (1)
- # rewrite-clj (4)
- # shadow-cljs (38)
- # xtdb (21)
Anyone know tools to rename namespaces in a codebase? (should include moving of file + updating all references)
I think I've seen it done using Cursive. Iirc it was an action on the renamed namespace symbol. So first edit that and then invoke this action. I could be remembering it wrong. Saw it in a pair programming session.
In theory you should be able to do it with clojure-lsp, refactor -> rename. But I seem to recall some issue with that...
https://github.com/clojure-emacs/refactor-nrepl#rename-file-or-dir works fairly decently. you can invoke it from a repl like any other lib
It should work with clojure-lsp. If there is a problem hopefully we can get it captured as an issue.
@U0BUV7XSA I’m super new to clojure-lsp, could you point me towards how I could do this?
Have the cursor in the namespace symbol and press F2, write the new name, submit with enter. (EDITED, because I mis-remembered).