* passing env to lsp#utils#job#start

* passing env to lsp#client#start

* env for only cmd

* do not need to add

* possible to specify env for the server

* update job.vim
This commit is contained in:
mattn
2022-04-05 07:39:13 +09:00
committed by GitHub
parent bfb7541eb8
commit 49656401fc
3 changed files with 25 additions and 22 deletions

View File

@@ -452,14 +452,17 @@ function! s:ensure_start(buf, server_name, cb) abort
endif
call lsp#log('Starting server', a:server_name, l:cmd)
let l:lsp_id = lsp#client#start({
\ 'cmd': l:cmd,
\ 'on_stderr': function('s:on_stderr', [a:server_name]),
\ 'on_exit': function('s:on_exit', [a:server_name]),
\ 'on_notification': function('s:on_notification', [a:server_name]),
\ 'on_request': function('s:on_request', [a:server_name]),
\ })
let l:opts = {
\ 'cmd': l:cmd,
\ 'on_stderr': function('s:on_stderr', [a:server_name]),
\ 'on_exit': function('s:on_exit', [a:server_name]),
\ 'on_notification': function('s:on_notification', [a:server_name]),
\ 'on_request': function('s:on_request', [a:server_name]),
\ }
if has_key(l:server_info, 'env')
let l:opts.env = l:server_info.env
endif
let l:lsp_id = lsp#client#start(l:opts)
endif
if l:lsp_id > 0