Skip to content

Commit

Permalink
Change GoImplements view configuration from mode to listtype fatih#3319
Browse files Browse the repository at this point in the history
  • Loading branch information
kerma committed Nov 7, 2021
1 parent c35a926 commit e028fd8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions autoload/go/implements.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@ function! go#implements#Implements(selected) abort
if !go#config#GoplsEnabled()
call go#util#EchoError("go_implements_mode is 'gopls', but gopls is disabled")
endif
let l:listtype = go#list#Type("GoImplements")
if l:listtype == "fzf"
call fzf#implements#cmd()
return
endif
let [l:line, l:col] = getpos('.')[1:2]
let [l:line, l:col] = go#lsp#lsp#Position(l:line, l:col)
let l:fname = expand('%:p')
call go#lsp#Implements(l:fname, l:line, l:col, funcref('s:parse_output'))
return
elseif l:mode == 'fzf'
if !go#config#GoplsEnabled()
call go#util#EchoError("go_implements_mode is 'fzf', but gopls is disabled")
endif
call fzf#implements#cmd()
return
else
call go#util#EchoWarning('unknown value for g:go_implements_mode')
endif
Expand Down

0 comments on commit e028fd8

Please sign in to comment.