-
Notifications
You must be signed in to change notification settings - Fork 682
Flow + Atom editor + JSX #141
Comments
Is this what you mean? |
See also #92 (comment) |
@nmote I am using ES6 Babel syntax highlighting... But even when I set the syntax to Javascript (JSX), I don't get any of the flow or hack bells and whistles... Here's my program, similar to the demo. /* @flow */
function a(b) {
return b + 1;
}
a('hello'); Nothing is warning me about the string. I can cmd+click on a to jump to the definition (that does multiple cursors...), and I'm not getting any Xcode-like dropdowns from hack... |
Flow from the command line doesn't warn me about that either. If you think that's incorrect then file an issue against https://github.com/facebook/flow. If jump to definition works then it's a good indicator that our Flow integration is working. |
I'm confused, look the first example: I have an empty
I don't get any warnings for type hints. And cmd+click does multiple cursors instead of jump to definition... I have nuclide-flow package installed... idk what else to do. its not working... :( |
It appears that files with a |
It looks like https://github.com/atom/language-javascript is the package that provides JavaScript syntax highlighting, perhaps filing an issue with them to add "jsx" to the list of extensions would be worthwhile. |
Hmm. I see. I'm using babel syntax highlighting... would be nice to be able to use flow with other syntax highlighters... |
So looking at the package: https://atom.io/packages/nuclide-flow
So I'm not getting the cmd-click jump to definition, and I'm not getting the hover... But they autocomplete has function signatures (pretty cool!!) |
You could create a pull request to add other grammars here: https://github.com/facebook/nuclide/blob/master/pkg/nuclide/flow/lib/constants.js#L13 So if you do have a package installed that provides syntax highlighting for |
sweet! Thanks for the help @nmote |
For me cmd-click still not works on JSX imports (just updated to nuclide 0.111) |
@istarkov, try cloning this repo, then opening the nuclide source directory in Atom, and going to |
@zertosh my fault looks like the problem not in inside main.js because inside isNot where is a |
You need |
And I'm not sure whether Flow will look for |
I just tried your example and Flow does in fact support |
Here I wrote that problem not in jsx #141 (comment) But why it is a syntax error? It is valid es6 syntax. |
I see. I'm not familiar with that syntax but Flow does not recognize it. I suggest you file an issue with Flow regarding that. |
There is already such issue ;-) facebook/flow#183 |
update test cases and implment argument punning
For those landing in this issue from Atom JSX javascript support, the answer is in this comment: atom/language-javascript#313 (comment) |
Is it possible to use Flow with JSX with the atom editor package?
The text was updated successfully, but these errors were encountered: