-
-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
Problem
That the formatter defaults to non-ascii is a barrier to adoption for my team:
- The pretty lambdas and arrows are perceived as being cute at the expense of practicality, giving the impression that Dhall chooses cuteness over practicality generally.
Proposal
- dhall-config.dhall is a file for configuring dhall
- starts with just one option, nested under
formatting:- { formatting: { ascii: Boolean } } -- defaults to False
- dhall discovers these config files somehow (TBD)
Thanks for this wonderful language. I could take a stab at a PR if this feature seems useful and doesn't detract from the current minimalism and simplicity too much.
Alternative Considered
We could add a setting for --ascii to the vscode extension.
But then in order for a team to keep the command line option in sync with the vscode extension and to serve users that don't use VSCode, they would need to (for exammple)keep a Makefile, vimrc, .emacs, etc. all in sync.
Prior Art
Every code formatter I could find that has options has a config file:
- https://hackage.haskell.org/package/hindent
- https://github.com/jaspervdj/stylish-haskell
- https://hackage.haskell.org/package/brittany
- https://github.com/psf/black
- https://prettier.io/docs/en/configuration.html
- https://github.com/rust-lang/rustfmt#configuring-rustfmt
The only way I've seen to avoid having a config file is to avoid having config, which is what gofmt does. But dhall format is configurable (--ascii).
Notes
- This proposal is unrelated to what the default value for the formatting option happens to be.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels