Fork me on GitHub
#cursive
<
2022-10-06
>
danm11:10:35

One of my colleagues has just introduced me to a cool IntelliJ feature that I'd not come across before. F6 in a file loads up a dialog with all of the functions/classes in that file (in Java, Python, TypeScript etc), and asks which ones you want to move to the new file location. Then it intelligently finds all the references to those functions/classes and updates them to import from the new location. F6 on a Clojure file in Cursive just gives a much simpler "Move File" dialog, and doesn't even update the namespace in the file to represent the new file system path (just warns you when you open it in the new location). Is there something I need to enable to get the enhanced functionality in Cursive? And if it's just not supported yet, is there somewhere I can officially request it as a feature?

2
cfleming00:10:21

This is something that isn’t in Cursive yet, but I should be able to do it now. This feature relies on being able to reliably rewrite ns forms, which was only added to Cursive recently.

🎉 3
danm11:10:55

During refactors it'd be really handy to be able to automatically move forms to a new namespace and add references to that namespace where the old was was imported and the forms used. Even if it only did it as a full ns import rather than trying to guess a reasonable :as

3
devurandom18:10:51

Hi! When right clicking a deps.edn file, there is a "Add as Clojure Deps Project" menu entry. How do I undo that? Is there a "Remove Clojure Deps Project" somewhere? I already tried clicking the project root folder and "Open Module Settings", but cannot find anything that seems related.

danm18:10:16

In the view -> tools menu (or is it toolbars? On phone right now), there is a Clojure deps projects sidebar. The option to display it only appears if you actually have a Clojure deps project set up in the current IntelliJ workspace. You can delete it from in there

devurandom18:10:24

Thanks a lot!