mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
plugins update
This commit is contained in:
@ -86,8 +86,10 @@ function! go#tool#Info(showstatus) abort
|
||||
call go#complete#Info(a:showstatus)
|
||||
elseif l:mode == 'guru'
|
||||
call go#guru#DescribeInfo(a:showstatus)
|
||||
elseif l:mode == 'gopls'
|
||||
call go#lsp#Info(a:showstatus)
|
||||
else
|
||||
call go#util#EchoError('go_info_mode value: '. l:mode .' is not valid. Valid values are: [gocode, guru]')
|
||||
call go#util#EchoError('go_info_mode value: '. l:mode .' is not valid. Valid values are: [gocode, guru, gopls]')
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@ -112,7 +114,22 @@ function! go#tool#Exists(importpath) abort
|
||||
endfunction
|
||||
|
||||
function! go#tool#DescribeBalloon()
|
||||
return go#guru#DescribeBalloon()
|
||||
let l:fname = fnamemodify(bufname(v:beval_bufnr), ':p')
|
||||
call go#lsp#Hover(l:fname, v:beval_lnum, v:beval_col, funcref('s:balloon', []))
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
function! s:balloon(msg)
|
||||
let l:msg = a:msg
|
||||
if has('balloon_eval')
|
||||
if has('balloon_multiline')
|
||||
let l:msg = join(a:msg, "\n")
|
||||
else
|
||||
let l:msg = substitute(join(map(deepcopy(a:msg), 'substitute(v:val, "\t", "", "")'), '; '), '{;', '{', '')
|
||||
endif
|
||||
endif
|
||||
|
||||
call balloon_show(l:msg)
|
||||
endfunction
|
||||
|
||||
" restore Vi compatibility settings
|
||||
|
Reference in New Issue
Block a user