You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
e.g. when typing a function signature and pressing RET after the opening {, should the new line be automatically indented by an additional 2 spaces?
I see that the gleam-ts-mode.el file has a good amount of stuff related to indentation, but I'm not sure if such auto-indentation on RET is supposed to work yet. It doesn't for me.
The text was updated successfully, but these errors were encountered:
I'd say that ideally it should work. The rules get a bit odd because when starting e.g. a new function, there's not an concrete syntax tree (CST) node there that we can attach indentation rules to. I thought we had worked around this with a rule like "anything after the braces is indented" but I'll need to check again.
frou
changed the title
gleam-ts-mode: Is auto-indentation when pressing RET at the end of a line supposed to work?
gleam-ts-mode: Auto-indentation when pressing RET in the presence of incomplete Nodes
Aug 27, 2024
Obviously I'm a bit strapped for time lately, but if someone wants to investigate these issues, you can play with the indentations rules. Happily they're quite declarative, though the selectors (e.g. parent-bol) are a bit arbitrarily defined.
e.g. when typing a function signature and pressing RET after the opening
{
, should the new line be automatically indented by an additional 2 spaces?I see that the
gleam-ts-mode.el
file has a good amount of stuff related to indentation, but I'm not sure if such auto-indentation on RET is supposed to work yet. It doesn't for me.The text was updated successfully, but these errors were encountered: