nand2tetris.el
nand2tetris.el copied to clipboard
Auto-indent for parenthesis
trafficstars
It would be nice if the mode would automatically indent multi-line function arguments to the appropriate parenthesis. For example, when I tab-indent the second line in this example I currently get this:
Mux16(a=XWithY, b=InvertedXWithY, sel=no,
out[0..7]=OutLow, out[8..15]=OutHigh, out[15]=ng, out=out);
But I expected to get this:
Mux16(a=XWithY, b=InvertedXWithY, sel=no,
out[0..7]=OutLow, out[8..15]=OutHigh, out[15]=ng, out=out);
I've done a little bit of this in the past, and I might be able to put some time into this at some point. But I at least wanted to get this onto the issue tracker.
After looking at the code a bit, I see that the mode does this kind of indentation quite well:
Mux16(
a=XWithY, b=InvertedXWithY, sel=no,
out[0..7]=OutLow, out[8..15]=OutHigh, out[15]=ng, out=out);
This is pretty reasonable to me. If you think that this is all that the mode needs to support, I'm fine to close this out.