diff options
author | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:57:35 -0700 |
---|---|---|
committer | Bjorn Neergaard <bjorn@neersighted.com> | 2018-11-29 14:57:35 -0700 |
commit | d2b0ae8108b2ee395d4eb43c49d68b322a023a30 (patch) | |
tree | bb8145e69bf1bcb8968b29cb1a68c47ceb83674d /ale_linters/javascript/flow_ls.vim | |
parent | ef641dda80f45cb979bc93c2513c6e10cbd8e42a (diff) | |
parent | 0a384a49d371838903d8401c5358ec60f3f4266d (diff) | |
download | ale-d2b0ae8108b2ee395d4eb43c49d68b322a023a30.zip |
Merge branch 'master' into sridhars
Diffstat (limited to 'ale_linters/javascript/flow_ls.vim')
-rw-r--r-- | ale_linters/javascript/flow_ls.vim | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/ale_linters/javascript/flow_ls.vim b/ale_linters/javascript/flow_ls.vim index 20fc2217..75377183 100644 --- a/ale_linters/javascript/flow_ls.vim +++ b/ale_linters/javascript/flow_ls.vim @@ -6,18 +6,6 @@ call ale#Set('javascript_flow_ls_use_global', \ get(g:, 'ale_use_global_executables', 0) \) -function! ale_linters#javascript#flow_ls#GetExecutable(buffer) abort - return ale#node#FindExecutable(a:buffer, 'javascript_flow_ls', [ - \ 'node_modules/.bin/flow', - \]) -endfunction - -function! ale_linters#javascript#flow_ls#GetCommand(buffer) abort - let l:executable = ale_linters#javascript#flow_ls#GetExecutable(a:buffer) - - return ale#Escape(l:executable) . ' lsp --from ale-lsp' -endfunction - function! ale_linters#javascript#flow_ls#FindProjectRoot(buffer) abort let l:flow_config = ale#path#FindNearestFile(a:buffer, '.flowconfig') @@ -31,8 +19,10 @@ endfunction call ale#linter#Define('javascript', { \ 'name': 'flow-language-server', \ 'lsp': 'stdio', -\ 'executable_callback': 'ale_linters#javascript#flow_ls#GetExecutable', -\ 'command_callback': 'ale_linters#javascript#flow_ls#GetCommand', +\ 'executable_callback': ale#node#FindExecutableFunc('javascript_flow_ls', [ +\ 'node_modules/.bin/flow', +\ ]), +\ 'command': '%e lsp --from ale-lsp', \ 'project_root_callback': 'ale_linters#javascript#flow_ls#FindProjectRoot', \ 'language': 'javascript', \}) |