Fork me on GitHub
Jacob Haag13:05:51

With intelij, for certain languages you can use an "intention" to generate the outline of a test for a desired function. Does this capability exist for Clojure and if not is it something that's been considered to add to Cursive?


If you right-click on a function and select Go To -> Test, it will give you the option of creating the test if it does not already exist.

Jacob Haag13:05:36

Ah neat, it's pretty minimal but is nice none the less


I just updated to the latest cursive and notice that bracket highlighting has changed, so that “outer brackets” are preferred to “inner brackets”. Was this an intentional change?


i believe the previous behavour was aligned with what “Extend selection” would select


this is a good way of describing it


Yes, that happened with a recent version and it’s a known issue. I think the underlying issue is something that changed in IntelliJ, and we’re waiting for JetBrains to fix it?

Jacob Haag15:05:36

How would I go about finding unused re-frame subscriptions w/ intelij and cursive? I tried using Analyze | Inspect Code but it doesn't pick up subscriptions lie



I don't think you can do anything apart from the full-text search or usages search (which can be slower than just full-text search).


Yes, there isn’t a very good solution for this right now, unfortunately. The global “Unused declaration” inspection doesn’t work for Clojure code, and I haven’t investigated why yet.


Cursive doesn't seem to always persist the REPL history. I'm on Ubuntu. When I restart my computer, only some very old REPL history is shown. If I close IntelliJ before shutting down, however, it will persist correctly.


Unfortunately I don’t think there’s much I can do about this, it’s just IntelliJ’s persistence mechanism. Do you find that other settings are also lost when shutting down like this?


I don't change other settings often enough. I'd expect settings to not be affected by this because in order to change those, I need to explicitly hit the Save button. The REPL history seems like it'd be saved in the same way regular files are saved. I do not have the problem of lost data when changing files.


@mhuebert Yes, this is an unfortunate IntelliJ regression. The original issue was here:, when that wasn’t fixed completely, was the follow-up.


@cfleming thanks for the links, happy to know it is being worked on by IntelliJ. I find the current behaviour confusing.

👍 4

Yes, it’s definitely super confusing. I suspect it’s not as bad for non-Lisp languages which don’t have tons of close parens stacked up, but for Clojure it’s very hard to figure out what’s going on.

👍 8