Fork me on GitHub
#cursive
<
2016-11-14
>
borkdude11:11:48

Cursive marks unused imports, this is great. Can I also remove them automatically?

ricardo15:11:56

@borkdude I haven’t found that option.

cfleming19:11:23

@borkdude No, that’s Optimise Imports, there’s an issue for that and I’m hoping to do it soon. That will include sorting imports/requires etc as well.

borkdude19:11:55

Oh well, it wasn’t that much work to do it by hand, but just wondered 😉

cfleming19:11:04

You can however clean them all up at once. Press Alt-Enter, and you’ll get the intention to remove them.

cfleming19:11:23

Hit right arrow and you’ll get a submenu, and you can clean them all up in a single file at once.

cfleming19:11:06

If you want to get really tricky, you can use Analyze-&gt;Run Inspection By Name…, search for Unused Import under the Clojure heading, and run it over your whole project. You can then clean the whole project at once by selecting “Apply Fix” in the results toolwindow.

cfleming19:11:06

@denik See https://cursive-ide.com/archive/644.html for some discussion and a proposed solution (which I still haven’t gotten around to)

katox20:11:20

@cfleming I'm pretty sure it happens to me as well - the bug with setting a breakpoint instead of opening a diff. It only happens sometimes. I don't have aviso or cljc in the project. I suspect I behaves like that if the repl is in the debug mode only.

bfabry20:11:13

I'm still getting the thing where if I open a .java file it takes over the whole window and removes my splits and it's starting to drive me crazy