Skip to content

Commit

Permalink
Merge pull request #3610 from rwxguo/doc-disable-gopls
Browse files Browse the repository at this point in the history
doc: Add Gopls disable checking when view the `:GoDoc`
  • Loading branch information
bhcleek authored Dec 23, 2023
2 parents ccf72ac + 5394ab8 commit dd45fb6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions autoload/go/doc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit dd45fb6

Please sign in to comment.