I'm wondering if it would make sense for this extension to register itself as a new language in vs code.
It could include the babel grammar from https://github.com/gandm/language-babel and support all the flow syntax.
I've been working for a couple of month with an extension that define it as a new language and it's a trade off, but I like it better.
Plus
Minus
Another option could be to create an second extension that define a language javascriptflow and have this extension support "javascript", "javascriptreact" and "javascriptflow"
What do you think?
I modified this extension to add a new language here, if anybody want to test: https://github.com/ericm546/flow-for-vscode/blob/master/flow-for-vscode-new-language-0.0.1.vsix
It does sound like a good idea overall, it feels like something that would break a lot of people's setups overnight - which is obviously worrying.
I've been hesitant with working on this kind of idea, because I know it'd be a support nightmare (I've not worked on a flow project in months) but if you're willing to take over on handling issues, I'm willing to give it a shot.
Came here because of #225. Not being able to use generics on arrow functions is a bummer. Not really sure what all is involved with creating a custom language, but wanted to register my support and offer whatever little assistance I can... which is probably not much :(
In the meantime, if anyone else runs into this the same way I did. You can get around this by using regular old anonymous functions like this:
function<T>(p: <T>): T { return p; }
Just to add my support for this too
As in you're going to start working on in @covertbert ?
Apologies I just meant that I would support it being worked on by someone (I know that's not helpful at all for you). While I'd love to contribute I'm not sure I have anything like the knowledge required although I could certainly try!
@chasingmaxwell Another quicker (and dirtier) fix for the syntax highlighting issue with generics is to add a "closing tag" in a comment, to trick VSCode's JS syntax highlighter:
const example = <T>/* </> */(x: T): T => whatever(x);
Obviously not pretty, but if you want to just have syntax highlighting for the rest of the file while you're working on it, it should do the trick.
@paul-russo You should use the Babel-Javascript by Michael McDermott for the syntax highlighter and grammar. It's far far better than vscode's default. I get the correct syntax highlighting while using that plugin (in fact, the first one is wrong in that case 馃槈):

@kumarharsh thank you!! For anyone reading the above worked perfectly for me ^^
Most helpful comment
@paul-russo You should use the
Babel-Javascriptby Michael McDermott for the syntax highlighter and grammar. It's far far better than vscode's default. I get the correct syntax highlighting while using that plugin (in fact, the first one is wrong in that case 馃槈):