File tree Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Expand file tree Collapse file tree 3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -596,11 +596,21 @@ function! LanguageClient#binaryPath() abort
596596 return l: path . l: filename
597597endfunction
598598
599+ function ! LanguageClient#installBinaries ()
600+ let l: installsh = ' cd ' . s: root . ' && ./install.sh'
601+ let l: output = split (system (l: installsh ), ' \n' )
602+ for l: line in l: output
603+ echomsg l: line
604+ endfor
605+ echomsg " Success."
606+ endfunction
607+
599608function ! s: Launch () abort
600609 let l: binpath = LanguageClient#binaryPath ()
601610
602611 if executable (l: binpath ) != 1
603- call s: Echoerr (' LanguageClient: binary (' . l: binpath . ' ) doesn'' t exists! Please check installation guide.' )
612+ call s: Echoerr (' LanguageClient: binary (' . l: binpath . ' ) doesn'' t exists!' )
613+ call s: Echoerr (' Run :LanguageClientInstallBinaries or check installation guide.' )
604614 return 0
605615 endif
606616
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ name=languageclient
1111
1212try_curl () {
1313 command -v curl > /dev/null && \
14- curl --fail --location " $1 " --output bin/$name
14+ curl --fail --silent --show-error -- location " $1 " --output bin/$name
1515}
1616
1717try_wget () {
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ endfunction
112112
113113command ! -nargs =* LanguageClientStart :call LanguageClient#startServer (<f-args> )
114114command ! LanguageClientStop :call LanguageClient#exit ()
115+ command ! LanguageClientInstallBinaries :call LanguageClient#installBinaries ()
115116
116117augroup languageClient
117118 autocmd !
You can’t perform that action at this time.
0 commit comments