Skip to content

Commit

Permalink
Use executable-find to look up flow binary for eldoc
Browse files Browse the repository at this point in the history
Flycheck will use executable-find, so just calling 'flow type-at-pos' can result in spawning conflicting flow versions
  • Loading branch information
jdelStrother committed Nov 11, 2016
1 parent b96d351 commit f7394a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion layers/+lang/flow-type/funcs.el
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

(defun flow-type/type-at-cursor ()
(let ((output (flow-type/call-process-on-buffer-to-string
(format "flow type-at-pos --retry-if-init=false --json %d %d" (line-number-at-pos) (+ (current-column) 1)))))
(format "%s type-at-pos --retry-if-init=false --json %d %d"
(executable-find "flow")
(line-number-at-pos) (+ (current-column) 1)))))
(unless (string-match "\w*flow is still initializing" output)
(flow-type/type-description (json-read-from-string output)))))

Expand Down

0 comments on commit f7394a5

Please sign in to comment.