Skip to content

Commit 4779a73

Browse files
committed
bugfix
1 parent b26966a commit 4779a73

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

autoload/easycomplete/action/completion.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function! easycomplete#action#completion#do(opt, ctx)
1717
return v:true
1818
endif
1919
call easycomplete#action#completion#LspRequest(l:info, a:opt['name'])
20+
call s:console(9997)
2021
return v:true
2122
endfunction
2223

autoload/easycomplete/lsp.vim

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,21 @@ function! s:ensure_init(buf, server_name, cb) abort
463463
endif
464464

465465
" server has already started, but not initialized
466-
467466
let l:server_info = l:server['server_info']
468-
let l:root_uri = has_key(l:server_info, 'root_uri') ? l:server_info['root_uri'](l:server_info) : ''
467+
if has_key(l:server_info, 'root_uri')
468+
let l:root_uri_type = type(l:server_info['root_uri'])
469+
if l:root_uri_type == v:t_list
470+
let l:root_uri_o = l:server_info['root_uri'][0]
471+
elseif l:root_uri_type == v:t_string
472+
let l:root_uri_o = l:server_info['root_uri']
473+
else
474+
let l:root_uri_o = l:server_info['root_uri'](l:server_info)
475+
endif
476+
else
477+
let l:root_uri_o = ""
478+
endif
479+
480+
let l:root_uri = l:root_uri_o
469481
if empty(l:root_uri)
470482
let l:root_uri = easycomplete#lsp#utils#get_default_root_uri()
471483
endif

0 commit comments

Comments
 (0)