Disable indentation - configuration variable #88
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently there are a lot of issues with the indentation that make it unusable, it forces indentation in such a way that the resulting code won't compile, and it's a bit of a PITA [#85 #83 #82 #73 #75 #69].
So the
g:haskell_indent_disable
can be set to1
(it defaults to0
) can be used to disable the indentation in a graceful way until these problems (or most of them at least) are solved in the indentation branch. It setsautoindent
so the user benefits from the same-level-indentation magic but still has the control over the right indentation to use at any time.Additionally, hindent can be used for the
equalprg
setting, so using=
will work as expected and don't mess up all the indentation. But this is not recommended as hindent will replace the code with an error message if it happens to be a syntax error on it. So the vim-hindent plugin is suggested to handle that issue and give auto indentation and formatting on file save.I'm currently trying this commit with my own code, and it's quite an enormous relief having the indentation to behave.