flow / vim-flow

A vim plugin for Flow
Other
525 stars 52 forks source link

Not an editor command: FlowMake #60

Open wgottschalk opened 7 years ago

wgottschalk commented 7 years ago

I'm using neovim with vim-plug as my package manager. I successfully installed the plugin after adding the following in my config file:

Plug 'flowtype/vim-flow', {
  \ 'autoload': {
  \   'filetypes': 'javascript'
  \ },
  \ 'build': {
  \   'mac': 'npm install -g flow-bin'
  \ }}
  let g:flow#flowpath = '$(npm bin)/flow'

However, flow is not running at all when after I save a file, and when I run the :FlowMake command I get the following error: E402: Not an editor command: FlowMake

I'm kind of a vim noob so any help would be appreciated!

dadiorchen commented 7 years ago

yes , I get the same error too , seem like the plugin is not installed successfully , I use Vundle ,and it show the plugin is installed ( with command :PluginList , the vim-flow show up)

ingocraft commented 7 years ago

24 will work for you.

Kraxxis commented 6 years ago

I'd like to chime in to help explain the issue I am also having.

My set up involves multiple projects, and I opted to forgo installing flow globally. Instead i added the solution offered in #24 to a ftplugin: ~/.vim/ftplugin/javascript.vim. The idea was to exclusively use the local installation of flow to avoid any versioning issues when hopping between each project, and by not using a global install, i could be confident the correct version was being used.

:echo g:flow#flowpath correctly displays my local project's flow executable path, however I was not getting any of the commands listed in the README (like :FlowMake).

Once I also installed flow globally, then all of the commands appeared correctly, even though I had no intention of using the global install or that version of the binary. And the configuration I added to ftplugin continued to work as planned.

So the problem would appear to be that vim-flow doesn't properly initialize if there is no global flow installed, regardless if one actually intends on using the global install or not.