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
If there is a parse error while trying to determine indentation (e.g. after pressing Enter), the mode completely breaks down. In the past it dropped to the beginning of the next line, currently the Enter key just stops working. This makes the whole mode unreliable to use.
My proposition is that it should be ensured that if the indentation breaks, the mode will still be more or less usable (at least that one is able to go to the next line) until it's able to work again (by getting out of the context it can't parse possibly, I'm not sure how it's implemented). As for the indentation level, I think the best course of action would be to just stay at the indentation level it's at when going to the next line (which is the right course of action the majority of time).
The text was updated successfully, but these errors were encountered:
gracjan
changed the title
indentation mode needs to be able to recover from parser errors
Indentation mode needs to be able to recover from parser errors
Sep 16, 2015
Yes this major usability problem. IMO enter should insert newline if indenter fails. There are always some weird corner case or plain invalid haskell which will cause parser errors so haskell-mode should fall back on some simpler heuristic
Shimuuar
added a commit
to Shimuuar/haskell-mode
that referenced
this issue
Oct 17, 2015
If there is a parse error while trying to determine indentation (e.g. after pressing Enter), the mode completely breaks down. In the past it dropped to the beginning of the next line, currently the Enter key just stops working. This makes the whole mode unreliable to use.
My proposition is that it should be ensured that if the indentation breaks, the mode will still be more or less usable (at least that one is able to go to the next line) until it's able to work again (by getting out of the context it can't parse possibly, I'm not sure how it's implemented). As for the indentation level, I think the best course of action would be to just stay at the indentation level it's at when going to the next line (which is the right course of action the majority of time).
The text was updated successfully, but these errors were encountered: