dprint / dprint-plugin-typescript

TypeScript and JavaScript code formatting plugin for dprint.
https://dprint.dev/plugins/typescript
MIT License
248 stars 55 forks source link

Support adding space before parenthesis in function call expressions #470

Open lorefnon opened 1 year ago

lorefnon commented 1 year ago

Currently we have config options for "functionDeclaration.spaceBeforeParentheses", "functionExpression.spaceBeforeParentheses", etc. It would be good to have a similar "functionApplication.spaceBeforeParentheses".

This is useful for sanctuary style curried functions.

S.reduce (S.add) (0) (xs)
adrian-gierakowski commented 1 year ago

👍

It would also be nice to allow:

S.reduce 
  (S.add)
  (0)
  (xs)

equivalent the following for non curried functions:

S.reduce(
  S.add,
  0,
  xs,
)