reason-mode icon indicating copy to clipboard operation
reason-mode copied to clipboard

Wrong indents with decorators and JSX

Open yashrk opened this issue 4 years ago • 1 comments

With ReasonReact example from https://reasonml.github.io/reason-react/docs/en/intro-example the default formating in reason mode is:

[@react.component]
  let make = (~name) =>
<button> {ReasonReact.string("Hello " ++ name ++ "!")} </button>;

The right formatting is, obviously, the following:

[@react.component]
let make = (~name) =>
  <button> {ReasonReact.string("Hello " ++ name ++ "!")} </button>;

Version of reason-mode — 20190710.1037 (from MELPA).

yashrk avatar Jan 28 '20 23:01 yashrk

Fun fact: saving a file restores the right formatting.

Is it refmt?

yashrk avatar Jan 29 '20 10:01 yashrk