Skip to content

Commit

Permalink
Merge pull request #2618 from bhcleek/rename/rename-config
Browse files Browse the repository at this point in the history
rename: change command config variable name
  • Loading branch information
bhcleek authored Dec 8, 2019
2 parents bca5f56 + df4fde2 commit ee51371
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions autoload/go/config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ function! go#config#PlayOpenBrowser() abort
return get(g:, "go_play_open_browser", 1)
endfunction

function! go#config#GorenameCommand() abort
function! go#config#RenameCommand() abort
" delegate to go#config#GorenameBin for backwards compatability.
return get(g:, "go_gorename_command", go#config#GorenameBin())
return get(g:, "go_rename_command", go#config#GorenameBin())
endfunction

function! go#config#GorenameBin() abort
Expand Down
2 changes: 1 addition & 1 deletion autoload/go/rename.vim
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function! go#rename#Rename(bang, ...) abort
let to_identifier = a:1
endif

let l:bin = go#config#GorenameCommand()
let l:bin = go#config#RenameCommand()

" return with a warning if the bin doesn't exist
let bin_path = go#path#CheckBinPath(l:bin)
Expand Down
4 changes: 2 additions & 2 deletions doc/vim-go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1676,13 +1676,13 @@ By default it is set to edit.
>
let g:go_alternate_mode = "edit"
<
*'g:go_gorename_command'*
*'g:go_rename_command'*

Use this option to define which tool is used to rename. By default `gorename`
is used. Valid options are `gorename` and `gopls`. Warning: as of `gopls`
v0.2.0, it will only rename identifiers in the current package.
>
let g:go_gorename_command = 'gorename'
let g:go_rename_command = 'gorename'
<
*'g:go_gorename_prefill'*

Expand Down

0 comments on commit ee51371

Please sign in to comment.