Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit fb9778d

Browse files
committed
Implement loading of local flow-bin
1 parent 2d6a904 commit fb9778d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

plugin/flow.vim

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ if !exists("g:flow#qfsize")
2424
let g:flow#qfsize = 1
2525
endif
2626
if !exists("g:flow#flowpath")
27-
let g:flow#flowpath = "flow"
27+
" Search for a local version of flow
28+
let s:npm_local_flowpath = finddir("node_modules", ".;") . "/.bin/flow"
29+
if filereadable(s:npm_local_flowpath)
30+
let g:flow#flowpath = s:npm_local_flowpath
31+
else
32+
let g:flow#flowpath = "flow"
33+
endif
2834
endif
2935
if !exists("g:flow#timeout")
3036
let g:flow#timeout = 2

0 commit comments

Comments
 (0)