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: field-space, but for labeled arguments in declarations #1225

Open
ELLIOTTCABLE opened this issue Feb 4, 2020 · 1 comment

Comments

@ELLIOTTCABLE
Copy link

Is your feature request related to a problem? Please describe.
At the moment, even with field-space = loose, the following ...

val mk :
  values : cmj_value Map_string.t ->
  effect : effect ->
  npm_package_path : Js_packages_info.t ->
  cmj_case : cmj_case ->
  t

formats to:

val mk :
  values:cmj_value Map_string.t ->
  effect:effect ->
  npm_package_path:Js_packages_info.t ->
  cmj_case:cmj_case ->
  t

This is not in-line with the style used across the project I'm trying to patch, and results in a lot of diff noise, unfortunately. I can't seem to find a feature that toggles the spacing around : colons in --intf files.

Describe the solution you'd like
It'd be nice if either:

  1. field-space = lose automatically applied also to labeled-arguments in interfaces, or
  2. a new option to control this spacing was added
@gpetiot
Copy link
Collaborator

gpetiot commented Nov 5, 2021

Sorry for the late reply.
The current direction of ocamlformat is to not add new options, but rather focus on improving the existing preset profiles (default, ocamlformat, janestreet).

I think not having a space around the : in this case is the most common style in the community but maybe I'm wrong, I'm not opposed to a change like this if the community pushes for it, any thought on this point @samoht @craigfe @Julow @jberdine ?

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

No branches or pull requests

2 participants