an-sh / flow-minor-mode

Emacs minor mode for editing flowtype files.
BSD 3-Clause "New" or "Revised" License
47 stars 16 forks source link

Show a multiline type #25

Closed knu closed 4 years ago

knu commented 4 years ago

Currently flow-minor-mode only shows the first line of a type-at-pos output, but a type representation may contain more than one line when a type does not fit in a line.

% node_modules/.bin/flow type-at-pos /path/to/Tweet.jsx 12 52
type Props = {
  body: string,
  children?: Node,
  hashtags: Array<string>,
  url: string,
  ...
}
/path/to/Tweet.jsx:12:52,12:56

In this case, you could only see type Props = {. This PR fixes the problem.