-
Notifications
You must be signed in to change notification settings - Fork 40
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
Please add haskell support #35
Comments
It would be nice to be able to fold up function definitions to just their type annotation line (if they have it), as a thought. |
@vyp the current behaviour does that, if the type annotation is preceded by a blank line. My main problem with this indentation is that if there is a haddock comment in the lines directly above the signature, the code gets folded to the first line of the haddock. |
Ah I see! I haven't actually used origami yet! (soon) So I assumed it didn't work with haskell at all because of this ticket.. 😑 |
Take a look at the parsers in https://github.com/gregsexton/origami.el/blob/master/origami-parsers.el The problem with Haskell is that there isn't a keyword used when defining a function, so this may be tricky. Unless you're willing to write an elisp Haskell parser (which would be cool) or one already exists (I have no idea), then you're probably left with adding some heuristics to the indentation parser. Maybe you could generalise this so we can add python support easily. Then the python guys will stop harassing me and I will be forever in your debt. :) I'll try and help out with specific questions as much as possible. |
with #69 and |
It would be great to have a simple solution for haskell folding. The current solution, based on indentation, has many of the problems already highlighted in the
python
issue. Is there an example parser from where I could start?The text was updated successfully, but these errors were encountered: