-
Notifications
You must be signed in to change notification settings - Fork 347
Indentation (and newline-and-indent) super slow #125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Which actual mode? haskell-indentation or haskell-indent? Another option is haskell-simple-indent which doesn't have any indentation cycle. |
The mode is haskell-indentation. haskell-indent is fast, but it does not indent the way I like it (for exaple, line up correctly in do block after newline, which haskell-indentation does correctly, but too slow). simple-indent is also no solution, because the only things I really need from a haskell mode are syntax highlighting and good indentation. |
I use (and now and then fight with :p) haskell-indentation as well, but haven't noticed any noticeable lags myself; maybe it's just having trouble parsing your file? |
I just noticed that it only happens when I have many lines in a where-clause, e.g.:
Are you familiar with the code-base of haskell-indentation.el? |
Nope, not at all :) |
I am the (original) author of haskell-indentation.el. What it does is, it traces back to the beginning of the expression by looking at the indentation, and then it parses the whole expression. It's slow, but it's also more accurate (usually). If you have an expression of a hundred lines long, then it will take much longer to find the correct indentation. I don't see an easy solution for this. Make sure that you use the byte-compiled version of haskell-indentation. |
We have just merged new, improved version of Should you experience problems with new |
Hi there
I have a major issue with indentation in this mode. For any medium-sized code file, hitting [TAB] or [RET] takes a second or even more to complete, which unfortunately makes this feature completely useless. I revert to manually indent because it takes too long to cycle the indentations to pick the correct one.
What could be going wrong? I ran the latest haskell-mode with no other packages interfering.
Thanks!
The text was updated successfully, but these errors were encountered: