You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do? (required: The issue will be closed when not provided)
I tried running a custom tool to adjust imports, this is, a tool different than gopls or goimports.
I configured g:go_imports_mode to run my custom tool foo:
let g:go_imports_mode = 'foo'
Then I opened a Go file and ran :GoImports.
What did you expect to happen?
I expected vim to call the tool foo and pass it the path of the file to be adjusted as an argument.
The tool foo is a placeholder, in reality, the tool foo will be a script that runs goimports then cgi, but I don't think that is relevant to this issue.
What happened instead?
Vim called the gopls tool to adjust the imports.
This behavour is somewhat consistent with the documentation of 'g:go_imports_mode' which says:
Valid options are `goimports` and `gopls`. [...]. By default `gopls` is used.
So maybe this is not an issue but a feature request :).
Configuration (MUST fill this out):
vim-go version:
commit ec7a59e, which is the current master at the time of writing.
What did you do? (required: The issue will be closed when not provided)
I tried running a custom tool to adjust imports, this is, a tool different than
gopls
orgoimports
.I configured
g:go_imports_mode
to run my custom toolfoo
:Then I opened a Go file and ran
:GoImports
.What did you expect to happen?
I expected vim to call the tool
foo
and pass it the path of the file to be adjusted as an argument.The tool
foo
is a placeholder, in reality, the tool foo will be a script that runs goimports then cgi, but I don't think that is relevant to this issue.What happened instead?
Vim called the gopls tool to adjust the imports.
This behavour is somewhat consistent with the documentation of 'g:go_imports_mode' which says:
So maybe this is not an issue but a feature request :).
Configuration (MUST fill this out):
vim-go version:
commit ec7a59e, which is the current master at the time of writing.
vimrc
you used to reproduce:Vim version (first three lines from
:version
):Go version (
go version
):Go environment
go env
Output:gopls version
gopls version
Output:The text was updated successfully, but these errors were encountered: