Skip to content
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

Feature request: turning it off for a fragment #442

Closed
michalrus opened this issue Sep 8, 2017 · 4 comments
Closed

Feature request: turning it off for a fragment #442

michalrus opened this issue Sep 8, 2017 · 4 comments

Comments

@michalrus
Copy link

michalrus commented Sep 8, 2017

Like:

x = 5
-- format: off
y = 6
-- format: on
z = 7

or similar.

Use case: Servant’s types. The API type would be most readable if each :<|> happened on a new line.

@sighingnow
Copy link
Collaborator

Hindent is just a pretty printer. I don't think we should make things become so complex for such a pretty printer.

@michalrus
Copy link
Author

michalrus commented Sep 22, 2017

Considering:

  • it’s a standalone binary
  • which you can use to edit files in place (which happens by default, even without a CLI switch!)
  • which means many people will use it to auto-format whole projects regardless of which editors are used by their particular developers,

I can’t see why hindent it’s not a good perfect place to have this.

How do you suggest I should do automatic whole-project auto-formatting, while keeping Servant types under control (i.e. not on a single 500-characters-long line)?

@michalrus
Copy link
Author

Formatters for other languages have exactly this feature:

It feels necessary as a “safety valve”.

@NorfairKing
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants