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
when I save I would like to obtain the following (with local imports separate from the rest, and extra lines at the beginning and end of functions removed)
Order matters when formatting and adjusting imports, because of gopls'
support for gofumpt. Gofumpt formatting will group all imports that look
like a stdlib package (e.g. there's no '.' in the package path)
together. When the local setting is provided, the only way to get the
local imports grouped separately when gofumpt is used to format is to
format first and then organize imports.
Fixesfatih#3151
What did you do?
I have configured
vim-go
to usegopls
for formatting and imports, and I have prepared a dummy package to illustrate the problem.go_gopls_fumpt
andgo_gopls_local
options do not work togethergofumpt
is applied, whereaslocal
is ignoredgofumpt
is not enabled, thenlocal
will workWhat did you expect to happen?
I would like that the
local
andgofumpt
options work correctly at the same time.Given this file (see also rest of the package, attached vim-go-gopls-options.zip)
when I save I would like to obtain the following (with local imports separate from the rest, and extra lines at the beginning and end of functions removed)
What happened instead?
I obtain the following result, where only
gofumpt
was applied, whereas thelocal
option was not respected:Configuration
vim-go version:
007d9bc7786d7
vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):Go version (
go version
):Go environment
go env
Output:gopls version
gopls version
Output:vim-go configuration:
vim-go configuration
filetype detection configuration:
filetype detection
The text was updated successfully, but these errors were encountered: