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
Closing each bracket should result in formatting the current expression.
Here's my initial implementation: master...renkun-ken:on-type-formatting. The basic approach is backward expand the range line and line from the requested point and parse the content in range, and after an expression is found, and then the next parsing results in more expressions or none (no longer parse-able) the expression under editing is found. I'm still doing experiments with it.
The trick I use to format incomplete expression with \n inserted is to replace the new blank line with a dot . so that the . could make the expression complete. The formatted text with last dot removed could be used as a text edit of the original text.
But there are still some edge cases such as breaking a line in the middle of an expression. I'll do more experiment with it and hopefully I could create a use-able on-type-formatter.
Activity