maralla/completor.vim

Using Flow LSP

Opened this issue · 1 comments

I'm interested in trying out the LSP support for Flow. This would mean 2 things

  1. I'd like to disable Tern (I couldn't seem to figure out a way to do this in the docs - I'd like to still keep the other completers like buffer and filename intact). Maybe it's already disabled since I don't have a .tern-config or whatever?

  2. Flow lsp is invoked via flow lsp and I'd like to set it up for javascript and javascript.jsx files.

I assume for a configuration I would do something like:

let g:completor_filetype_map = {
      \ 'javascript':   {'ft': 'lsp', 'cmd': 'flow lsp'},
      \ 'javascript.jsx':   {'ft': 'lsp', 'cmd': 'flow lsp'},
      \ }

Do I need both the javascript and javascript.jsx?

  1. And finally - is there a way I can debug to ensure it's working properly?

I think it will work by just adding the file type map config. I tried with the following config for my environment:

let g:completor_filetype_map = {}
let g:completor_filetype_map.javascript = {'ft': 'lsp', 'cmd': '/home/maralla/Workspace/tmp/node/node_modules/.bin/flow lsp'}

and it worked very well.

Yes both the javascript and javascript.jsx should be added. To show the debug log just let g:completor_debug = 1 then tail the file located at /path/to/completor.vim/pythonx/completor.log.