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
Suddenly, my auto imports stopped working for new go projects. For existing projects, it appears to be working still. I have searched for this issue on the internet and in the troubleshooting but couldn't get a clear answer. The only thing I recently did (in this context) was updating to go version 1.21.6
What did you do? (required: The issue will be closed when not provided)
Re-installed Go 1.21.6
Re-installed Vim 9.0
Re-installed go.vim
Ran :GoInstallBinaries
Tried several package managers (Pathogen and VIM packages) to install go.vim
Steps:
mkdir test
cd test
go mod init main
vim main.go
delete 'import "fmt"' line
save file
What did you expect to happen?
I expected vim.go to add 'import "fmt"' when saving the file.
What happened instead?
It didn't add the import line. It did however remove the the newline that was present (so the formatter worked)
Configuration (MUST fill this out):
vim-go version:
5bed70d - (3 days ago) Merge pull request #3628 from bhcleek/revive/unpin - Billie Cleek (HEAD -> master, origin/master, origin/HEAD)
vimrc you used to reproduce:
syntax on
execute pathogen#infect()
filetype plugin indent on
let mapleader = ","
"Go:
au FileType go nmap r :GoRun
au FileType go nmap b :GoBuild
au FileType go nmap t :GoTest
au FileType go nmap d :GoDoc
au FileType go nmap cw :GoRename
Vim version (first three lines from :version):
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 12 2023 01:15:20)
macOS version - x86_64
Included patches: 1-2018
I'm not able to duplicate this. Can you try running :GoUpdateBinaries to update the binaries? :GoInstallBinaries only installs missing binaries; it doesn't update binaries that already exist the way :GoUpdateBinaries does.
If that doesn't resolve the problem, then please execute :let g:go_debug=['lsp'] and provide the contents of the __GOLSP_LOG__ window.
Suddenly, my auto imports stopped working for new go projects. For existing projects, it appears to be working still. I have searched for this issue on the internet and in the troubleshooting but couldn't get a clear answer. The only thing I recently did (in this context) was updating to go version 1.21.6
What did you do? (required: The issue will be closed when not provided)
Steps:
What did you expect to happen?
I expected vim.go to add 'import "fmt"' when saving the file.
What happened instead?
It didn't add the import line. It did however remove the the newline that was present (so the formatter worked)
Configuration (MUST fill this out):
vim-go version:
5bed70d - (3 days ago) Merge pull request #3628 from bhcleek/revive/unpin - Billie Cleek (HEAD -> master, origin/master, origin/HEAD)
vimrc
you used to reproduce:syntax on
execute pathogen#infect()
filetype plugin indent on
let mapleader = ","
"Go:
au FileType go nmap r :GoRun
au FileType go nmap b :GoBuild
au FileType go nmap t :GoTest
au FileType go nmap d :GoDoc
au FileType go nmap cw :GoRename
Vim version (first three lines from
:version
):VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Nov 12 2023 01:15:20)
macOS version - x86_64
Included patches: 1-2018
Go version (
go version
):go version go1.21.6 darwin/amd64
Go environment
go env
Output:gopls version
gopls version
Output:The text was updated successfully, but these errors were encountered: