Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Flow LSP #265

Open
amadeus opened this issue May 25, 2019 · 1 comment
Open

Using Flow LSP #265

amadeus opened this issue May 25, 2019 · 1 comment

Comments

@amadeus
Copy link

amadeus commented May 25, 2019

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?
@maralla
Copy link
Owner

maralla commented Jun 3, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants