-
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
Refmt configuration file #2567
Comments
Real world story from one department in a large company: engineers and managers started endless arguing regarding python formatters and corresponding configurations. It was ended by agreeing to use single not-so-popular formatter that did not have any configuration. Opinionated non-configurable formatter is a must in modern software engineering. Golang is a great example of how opinionated non-configurable things make everything highly consistent and coherent, and save time which would otherwise be wasted on arguing and agreeing upon some local standards. |
@Lupus, my suggestion is about providing uniformed way of sharing one option that is already configurable. I am not suggesting extending configurability of refmt |
It's actually very different, this does read as suggesting additional configurability, but putting that aside I agree having a file for this would be awesome. I don't like needing to use vscode settings to enforce the line length, which means the IDE integration needs a setting for it too. |
What tool would supposedly read such a config file format? Refmt itself? Or build tooling such as dune? |
Thanks for starting the discussion. I thumbs upped it and thumbs downed it because it's complicated. Doesn't it seem overkill to have a config file just for one item? If it is a good idea in the first place, it seems a package.json would be the best place to put such a config because peoples' directories are already littered with tons of config files especially when they have a native project that has |
I assumed it would be supported by I'm not fussed whether it's a |
Would it climb to the root of the file system upon every refmt invocation starting with the file path? What if it's coming from stdin, would it use the pwd? If someone wants to specify a concrete proposal for where it should live and how it's resolved, and get some consensus around it, it will make people much more willing to send a PR because they will see it is more likely to get merged. |
The suggestions to have a line length setting in |
It is also a poor suggestion. It would exclude all other editors and those using RLS, or merlin directly. |
Maybe refmt could just follow what ocamlformat is doing. We can split the problem in two parts, as each of them is quite involved on its own:
|
I think it'd be optimal to have a specific config file like |
Since it is possible to configure max output line length for
refmt
, can we consider support for configuration file similar to.ocamlformat
?I understand that
refmt
is supposed to be opinionated non-configurable formatter. But having one configurable option is not really different from having a lot of them. Developers still need to somehow share this configuration, and right now it is something that is hard or impossible to achieve.What do you think?
The text was updated successfully, but these errors were encountered: