Fork me on GitHub
#cursive
<
2022-05-10
>
kennytilton17:05:11

So I type (try and then hit return and now my code looks like this:

(when-let [^State state (:state-ref (meta me))]
      ((try

         (catch Exception e
           ))(.setState state (fn [] (do)))))
Kinda cool because I always struggle to remember all that, but...why is that happening? Is cursive doing that, or do I have some unknown plugin doing that? Anyone know how to make this stop? Thx!

isak18:05:23

It is probably this:

isak18:05:16

But on mine the default is it expands with TAB, not Enter, so I wonder why it is doing that for you if you haven't changed it

cfleming22:05:25

Yes, that sounds like the live template. I’ve actually found them expanding unexpectedly recently too, what I suspect is happening is that IntelliJ is adding them to the autocomplete, and you have to pay attention to see whether what’s being completed is the symbol (e.g. try) or the live template.

kennytilton09:05:26

Finally dug into this and tested a bit. I do get the expansion on both tab and return, tho the setting si for tab. Anyway, not a feature I need so I just turned it off. Thx for the pointer to the relevant pref, @U08JKUHA9! 🙏

1