Closed cblp closed 6 years ago
Hmm. This is a bit of a questionable case. Since we support other prettifiers, and apparently there is (if rudimentary) support for literate Haskell in hindent
, it's not immediately obvious how this should be handled.
Currently, default settings lead to a guaranteed error on .lhs
files.
What about adding some ticks?
[_] prettify Haskell source files [_] prettify Literate Haskell source files [_] prettify Cabal files
A canonical way of addressing it would be to provide configurable list of scopes that prettifier should activate on, but I'm not sure it would be immediately obvious what that means. Besides, there's an issue of Cabal files, since those are handled by cabal format
rather than a "normal" prettifier.
Tics would be a fine entry-level option, but those could be unnecessarily rigid and need to be updated to match language-haskell
to be useful.
A more flexible option would be to have scopes-to-binaries mapping in config, but that's not configurable through GUI.
Probably doing both tics and flexible scopes-to-binary mapping is a reasonable middle ground?
Yet another solution is to split the prettifying function into a separate package (or packages).
Want to prettify Cabal files? Install pretty-cabal
package.
Want to prettify Haskell files? Install pretty-haskell
, configure command for each type.
See also #181
I feel like splitting prettifier packages would be a bit weird at this point. Still might be done one day, but not today, I don't think. Anyway, I'm going to try to implement ticks for the time being, and see about a more flexible configuration at a later date. Does that sound reasonable?
Yes, I think so.
Okay, done in v2.2.0. Also worth mentioning: https://atom-haskell.github.io/core-packages/ide-haskell/#advanced-configuration-since-v2-2-0
Until stylish-haskell supports it.