Closed yuezhu closed 3 years ago
Thanks for the PR! I've tested this particular case with emacs -q
and the latest version of jsonnet-mode
and don't have this issue; the closing bracket isn't indented after I initially type it, but with electric-indent-mode
enabled, pressing RET indents it properly (the same is true if I press TAB).
I'm not opposed to merging this PR, but I'm unsure whether it would unexpectedly change the behavior of other SMIE rules. I'd like to merge #25 before merging this just to be extra sure! In a more general sense, if this change doesn't break other SMIE rules, I'm guessing some of the current SMIE rules would become superfluous/redundant (I honestly didn't know about smie-indent-close
:smile:).
Yeah, I have electric-indent-mode
enabled and the close paren is indented for an extra level while it should align with the corresponding opening paren. After I added smie-indent-close
, the opening and close parens are aligned.
I actually have little knowledge on SMIE indentation engine so I am not sure if smie-indent-close
comes with any side effects, though it apparently fixes the paren alignment. I completely agree that #25 would be helpful.
Description
This fixes smie indentation by aligning close paren with opening paren.
Motivation and Context
The close paren should be aligned with its opening one. eg:
However, current indentation behavior would make it