Fork me on GitHub
#cursive
<
2018-04-23
>
borkdude09:04:46

Haven’t been using Cursive for a long time. Is it able to rename namespaces across clj/cljc/cljs and all the requires that belong to it?

gklijs09:04:51

@borkdude just did a quick test renaming a cljc namespace, it seems to work, even the namespace of the test clj was changed.

borkdude09:04:29

Hmm, it seems clj-refactor also supports this. Gotta try it.

cfleming09:04:56

@borkdude Cursive doesn’t support this very well, at least yet. You can only really rename the last segment of a namespace name, since anything else requires moving things around. clj-refactor supports this for clj I think, but not cljs or cljc. cljc is actually pretty hard to do right.

Oliver George03:04:43

I'd so love refactoring to work. It gets super fiddly to manage namespace uses especially if you have ::local-keyword in the code. Expanding them to fully qualified keywords helps but that's fiddly to do manually too.

cfleming05:04:34

I know, I’d love this too 😞

borkdude10:04:17

thought so yes

gklijs10:04:59

I only changed the last part indeed..

Empperi11:04:06

Can I somehow tell Cursive to search clj, cljc and cljs files for references when talking about keywords?

Empperi11:04:35

now it depends on the file type if it finds it or not, which is kinda annoying in full-stack clojure project when for example renaming a keyword or searching where it is used

Empperi11:04:57

I've ended up using "find in path" and "replace in path" but that is more than sub-optimal solution

cfleming22:04:56

@niklas.collin It shouldn’t be scoped by file type, I’ll check that.