Fork me on GitHub

@puzzler: I looked at all my config and couldn't find anything obvious. I may have smart parens on, here's how my repl behaves - open paren creates a closing paren, enter goes to next line, ctrl-enter executes. I have structural editong turned off in the bottom right of the screen. Wish I could be more help!


@shaun-mahood Right, I think that's the distinction. I have it set up so that typing an open paren does not create a closing paren. And that seems to break the Enter/Ctrl-Enter behavior in the REPL.


@puzzler I’ll try to reproduce that and fix it.


@puzzler Just to be clear, is your problem is that Ctrl-Enter doesn’t send the command immediately, or that Enter does send immediately?


@cfleming Both Enter and Ctrl-Enter send the command immediately, so there's no way to do multi-line entry (without manually adding an extra right-paren and then keyboarding back to before the right-paren).


Instructing cursive about the indentation settings for a macro doesn't seem to work the way I remember it working, or the way that is explained in the Cursive documentation. When clicking on the "lightbulb" for the macro, instead of letting me type a number of characters to indent, it takes me to a completely different dialog box under the indentation settings in the settings panel and shows an example of how "while" would be re-indented (even though I clicked on something other than while), but there doesn't seem to be any way to edit this box or add a new construct or make any changes. What am I missing?


@puzzler I’m not sure why it would work in the way you describe. I’m in the middle of a merge, when I’m done I’ll check that.


Hmmm, I was clicking on the little triangle arrowhead at the right to see the options, but it looks like that is the wrong thing to do. If you click to the left of the triangle it works more as expected. Confusing, but I think I might have it figured out now.


What is the difference between setting the "resolution" and setting the "indentation"? Is that just two different ways of accomplishing the same thing?


No, the indentation just sets the indentation rules.


BTW one point on that - the number is not the number of spaces to indent the form, it’s the number of parameters to treat as special.


Those parameters will be aligned, then everything following them will be assumed to be body forms, and will be indented two spaces.


Interesting. So what is resolution? It seems like resolution is also an indenting thing, a way to say "indent this form like this other common form".


No, resolution refers to symbol resolution. So if you have a let-like macro form you’ve defined, you can say that your form should resolve its local variables in the same way as let.


That requires that your form conforms to the grammar for let, so it only works for forms that are very similar syntactically to their built-in counterparts.


Also, when the lightbulb pops up, the most convenient way to see the options is Alt-Enter rather than clicking.


I’ll see if I can figure out the triangle issue, I might not have seen that since I never click the bulb.


Alt-Enter shows the same thing as clicking on the lightbulb: misleading triangles at the right end of the option which take you to the wrong dialog.


Maybe you just know the "right" way to interpret, so you never noticed the triangles.


Is there a way to see all the forms you've "taught" to cursive? Is there a way to teach it something that persists across projects?


Oh, I see - you’re referring to the arrow in the popup menu, not the arrow on the lightbulb itself. Yes, that will show further options for each item, often allowing you to disable the relevant inspection, or configure it, etc.


Right, I thought that arrow was the only thing to click on. It gives you an option to "configure indentation" which is what I thought I needed to click, but it takes you somewhere that doesn't do anything.


Or, at least, all it lets you do is turn on and off the indentation overall, I think.


Yes. You can see the indentation configuration under Settings-&gt;Editor-&gt;Code Style-&gt;Clojure-&gt;Form Parameters, and the resolution configuration under Settings-&gt;Languages &amp; Frameworks-&gt;Clojure-&gt;Symbol Resolution.


Neither of those currently allow editing the forms, because of my fear of JTables - that’s on my list to fix.


Oh, and those settings should both persist across projects.


Is there any way to "unteach" something you've added to the indentation configuration?


Not currently, due to the aforementioned JTable fear. You can reconfigure the form to the correct indentation, though.


What is the difference between 0 and indent?


There probably isn’t one, now that I think about it.


Both will cause all forms after the head symbol to be indented two spaces.


Hmmm, so is there a way to get back to something working like functions do by default, i.e., things line up under the first parameter?


That’s something I realised was missing, and will add for the next EAP, now that you mention it. Functions internally have essentially Integer.MAX_VALUE parameters - the best approximation available in the UI right now is to set that to 9. I’ll add a “Function” option there which will do the right thing.