tptee / FlowIDE

IDE-caliber support for Flow in Sublime Text
MIT License
38 stars 6 forks source link

Added new arguments to the flow call to enable completions across files #3

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

Currently neither auto completion nor type hinting work across files, i.e.

// tree.js
class Node<T> {
    insert(value: T) {
    }
}
let tree: Node<number> = new Node();
tree. // <--- autocompletion ok (returns insert)

// test.js
import {Node} from './tree.js'

let tree: Node<number> = new Node();
tree. // <--- autocompletion does not work; type hinting returns unknown

Adding a file path to the flow binary call for both commands fixes this.

I've only just started using flow and didn't really look into how the cli calls work (as in why does this happen and how it works) but this fixes my issues for now so I figured I'd send in a pull request as well (this is how I noticed one of the working atom extensions does its calls so I just used that).

I've also found and fixed a missing comma in one of the list declarations which caused a malformed flow binary call.

tptee commented 8 years ago

Confirmed that this works. Thanks for the awesome PR! Can't believe I missed that 😆

tptee commented 8 years ago

Released in v1.1.3! You should see the update in Package Control within the hour.