From e028fd80c5b3c2aa4c31bc67bcb8e0f03500d0dc Mon Sep 17 00:00:00 2001 From: Margus Kerma Date: Sun, 7 Nov 2021 14:29:40 +0200 Subject: [PATCH] Change GoImplements view configuration from mode to listtype #3319 --- autoload/go/implements.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/autoload/go/implements.vim b/autoload/go/implements.vim index 477d82ef76..e3cb2cd707 100644 --- a/autoload/go/implements.vim +++ b/autoload/go/implements.vim @@ -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