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 @@ -794,11 +794,21 @@ function! LanguageClient#binaryPath() abort
794794 return l: path . l: filename
795795endfunction
796796
797+ function ! LanguageClient#installBinaries ()
798+ let l: installsh = ' cd ' . s: root . ' && ./install.sh'
799+ let l: output = split (system (l: installsh ), ' \n' )
800+ for l: line in l: output
801+ echomsg l: line
802+ endfor
803+ echomsg " Success."
804+ endfunction
805+
797806function ! s: Launch () abort
798807 let l: binpath = LanguageClient#binaryPath ()
799808
800809 if executable (l: binpath ) != 1
801- call s: Echoerr (' LanguageClient: binary (' . l: binpath . ' ) doesn'' t exists! Please check installation guide.' )
810+ call s: Echoerr (' LanguageClient: binary (' . l: binpath . ' ) doesn'' t exists!' )
811+ call s: Echoerr (' Run :LanguageClientInstallBinaries or check installation guide.' )
802812 return 0
803813 endif
804814
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ arch=$(uname -sm)
1313
1414try_curl () {
1515 command -v curl > /dev/null && \
16- curl --fail --location " $1 " --output bin/$name
16+ curl --fail --silent --show-error -- location " $1 " --output bin/$name
1717}
1818
1919try_wget () {
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ endfunction
156156
157157command ! -nargs =* LanguageClientStart :call LanguageClient#startServer (<f-args> )
158158command ! LanguageClientStop call LanguageClient#shutdown ()
159+ command ! LanguageClientInstallBinaries :call LanguageClient#installBinaries ()
159160
160161function ! s: OnBufEnter ()
161162 if ! LanguageClient#HasCommand (&filetype )
You can’t perform that action at this time.
0 commit comments