Change indendtation of functions with many arguments
Open
Nobody has claimed this yet.
Printer
- Dominant language
- OCaml
- Stars
- 10.3k
- Forks
- 438
- PR merge metrics
- No merged PRs in 30d
Description
Current indentation:
let makeCallback =
(
~target,
~method,
~getHeader,
~create_response,
~respond_with_string,
~headers_of_list,
~read_body,
~headers,
~context: Context.t,
reqd,
) => {
open Lwt.Infix;
What I want (and more people on Discord seem to agree):
let makeCallback = (
~target,
~method,
~getHeader,
~create_response,
~respond_with_string,
~headers_of_list,
~read_body,
~headers,
~context: Context.t,
reqd,
) => {
open Lwt.Infix;
With my proposal the body of the function is in line with the arguments instead of to the left of them.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the formatter logic that handles functions with many arguments, using the OCaml examples in this issue as a reproduction case. Run the formatter on the example and verify that the opening parenthesis and arguments are indented as shown while the function body aligns with them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100