lukehoban / atom-ide-flow

Atom IDE support for Flow
MIT License
87 stars 17 forks source link

Don't get autocompletion when importing relative packages? #29

Open benjamindulau opened 9 years ago

benjamindulau commented 9 years ago

As soon as I try to import a relative package, I lose autocomplete features.

In the first capture, you can see that I get autocompletion correctly. But not in the second one.

capture d ecran 2015-05-08 a 11 56 58

capture d ecran 2015-05-08 a 11 58 00

thunyasitth commented 9 years ago

I have the same issue. In my case I use require("./abcd").

For Node modules require("mod") is working fine. But when I use require("./abcd") for internal file reference the auto complete is gone.

PS. Flow and error checking is work perfectly in both case

mrmurphy commented 9 years ago

I've found that this depends on the version of flow you are using. I spent a day debugging this myself, and it appears that flow 0.10 actually doesn't return any results when autocomplete is called with the filepath of the file being completed. When I modified my own copy of flow-ide to not pass in a filename, autocomplete began working again.

However, autocomplete between files appears to be broken in flow currently. Here's an issue to watch: https://github.com/facebook/flow/issues/439