Skip to content

Commit 594ae6b

Browse files
authored
Merge pull request #3090 from bhcleek/gopls/disabled/messages
fix error handling when gopls is disabled
2 parents ea0204b + 68545b4 commit 594ae6b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

autoload/go/calls.vim

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set cpo&vim
44

55
function! go#calls#Callers() abort
66
if !go#config#GoplsEnabled()
7-
call go#util#EchoError("go_referrers_mode is 'gopls', but gopls is disabled")
7+
call go#util#EchoError("gopls is disabled")
8+
return
89
endif
910
let [l:line, l:col] = getpos('.')[1:2]
1011
let [l:line, l:col] = go#lsp#lsp#Position(l:line, l:col)

autoload/go/referrers.vim

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function! go#referrers#Referrers(selected) abort
1010
elseif l:mode == 'gopls'
1111
if !go#config#GoplsEnabled()
1212
call go#util#EchoError("go_referrers_mode is 'gopls', but gopls is disabled")
13+
return
1314
endif
1415
let [l:line, l:col] = getpos('.')[1:2]
1516
let [l:line, l:col] = go#lsp#lsp#Position(l:line, l:col)

0 commit comments

Comments
 (0)