From 5394ab8bb180bf46a606acb499b13c32205c07b9 Mon Sep 17 00:00:00 2001 From: rwxguo <10892928+rwxguo@users.noreply.github.com> Date: Fri, 15 Dec 2023 16:52:12 +0800 Subject: [PATCH] update --- autoload/go/doc.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/go/doc.vim b/autoload/go/doc.vim index 34d45763c7..ca1943b1fe 100644 --- a/autoload/go/doc.vim +++ b/autoload/go/doc.vim @@ -20,7 +20,7 @@ function! go#doc#OpenBrowser(...) abort endfunction function! s:docURL() abort - if len(a:000) == 0 + if len(a:000) == 0 && go#config#GoplsEnabled() " call go#lsp#DocLink directly instead of s:docURLFor, because s:docURLFor " will strip any version information from the URL. let [l:out, l:err] = go#lsp#DocLink() @@ -64,7 +64,7 @@ function! go#doc#Open(newmode, mode, ...) abort let l:package = l:words[0] endif - if a:0 is 0 && &filetype == 'go' + if a:0 is 0 && &filetype == 'go' && go#config#GoplsEnabled() " use gopls to get documentation for go files let [l:out, l:err] = go#lsp#Doc() else @@ -239,7 +239,7 @@ endfunction function! s:godocWord(...) abort let l:words = a:000 if a:0 is 0 - if &filetype isnot 'godoc' + if &filetype isnot 'godoc' && go#config#GoplsEnabled() let [l:out, l:err] = go#lsp#DocLink() if !(l:err || len(l:out) is 0) " strip out any version string in the doc link path.