-
Notifications
You must be signed in to change notification settings - Fork 428
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
Move some of the printer logic to Easy Format #987
Comments
cc @bobzhang |
Since it's one file, should we include it in core Reason's src? |
I'm ok with forking and vendoring, especially when we probably won't have much updates from Easy Format in the near future. |
Some thoughts from #41. I think we might need to extend Usecase:
In the above we want to group items according to the same kind. I agree this is much more readable than
Another thing is we might need 'normalisation` of newlines above 'groups'. Example:
If we don't do this, we get:
Doesn't look that great. I would propose something like:
Gonna dive into |
The current API in Easy Format has it's limitations, which require us to do a lot of hacks in our printer to support special use cases. It would be great if we can move those features into Easy Format's API, that would make our life much easier.
The wishlist includes:
This is mainly for end of line comments. Consider a list with "," as separator:
To format this using, current Easy format API looks like :
There is no clean way in the current API to add comment after
x
. Instead, we have to transform the API call into something like:, which is ugly and hard to maintain.
In Reason we want
Currently we can't use the clean api, instead we need to apply a hack like:
I wish we can have a api to say:
Basically listed here:
Ability to include and customize "Trailing separators" ocaml-community/easy-format#2
The challenge is to nicely design the APIs listed above.
The text was updated successfully, but these errors were encountered: