reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.14k stars 428 forks source link

Refmt improvement and document support for OCaml functions #2637

Closed raptazure closed 3 years ago

raptazure commented 3 years ago

Thanks for this wonderful language! According to my usage, maybe some minor improvements can be made to improve developers' experience.

  1. When there are less than 80 characters, running refmt will keep the pipe operators in one line instead of breaking new lines, which makes them feel less elegant, I think. image image

  2. Maybe indentations for switch statement can be considered as an alternative to current style, like the Haskell formatter. (config file for refmt perhaps?) image

  3. Documentation for JavaScript functions are great, it will be even better if syntax highlighting can be added to the documentation code. image

  4. Documentation for OCaml functions seems not supported now, maybe type information + docs of the function is better. image