Skip to content

Commit

Permalink
Merge pull request #3096 from bhcleek/guru/re-enable
Browse files Browse the repository at this point in the history
guru: re-enable commands
  • Loading branch information
bhcleek authored Nov 15, 2020
2 parents 3cdd4c8 + 9448f3f commit 124c6c5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ IMPROVEMENTS:
[[GH-3068]](https://github.com/fatih/vim-go/pull/3068)
* Show identifier in fzf's preview window with `:GoDecls` and `:GoDeclsDir`.
[[GH-3083]](https://github.com/fatih/vim-go/pull/3083)
* Do not hookup commands that require `guru` when not in GOPATH mode.
[[GH-2704]](https://github.com/fatih/vim-go/pull/2704)
* Use `gopls` for `:GoCallers`.
[[GH-3088]](https://github.com/fatih/vim-go/pull/3088)
[[GH-3090]](https://github.com/fatih/vim-go/pull/3090)
Expand Down
6 changes: 3 additions & 3 deletions autoload/go/guru.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ set cpo&vim
" example output:
" {'cmd' : ['guru', '-json', 'implements', 'demo/demo.go:#66']}
function! s:guru_cmd(args) range abort
if !go#package#InGOPATH()
return {'err': 'guru only supports packages within GOPATH'}
endif
"if !go#package#InGOPATH()
"return {'err': 'guru only supports packages within GOPATH'}
"endif
let mode = a:args.mode

let format = a:args.format
Expand Down
4 changes: 2 additions & 2 deletions ftplugin/go/commands.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ command! -nargs=? -complete=customlist,go#rename#Complete GoRename call go#renam

" -- guru
" do not configure commands that _require_ guru when not in GOPATH mode.
if go#package#InGOPATH()
"if go#package#InGOPATH()
command! -nargs=* -complete=customlist,go#package#Complete GoGuruScope call go#guru#Scope(<f-args>)
command! -range=% GoPointsTo call go#guru#PointsTo(<count>)
command! -range=% GoWhicherrs call go#guru#Whicherrs(<count>)
Expand All @@ -12,7 +12,7 @@ if go#package#InGOPATH()
command! -range=% GoCallstack call go#guru#Callstack(<count>)
command! -range=% GoFreevars call go#guru#Freevars(<count>)
command! -range=% GoChannelPeers call go#guru#ChannelPeers(<count>)
endif
"endif

command! -range=% GoImplements call go#implements#Implements(<count>)
command! -range=% GoReferrers call go#referrers#Referrers(<count>)
Expand Down

0 comments on commit 124c6c5

Please sign in to comment.