-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"vim-go: goimports does not support srcdir" and file clearing #775
Comments
Hi @velovix What happens if you run |
Results of
It looks like I'm up to date. |
What gives this ex command when you execute it from inside vim:
And from your terminal:
Seems like your Vim picks up an old version somehow. This is not something I can reproduce, let's see if we can find something. |
It looks like this wasn't an issue with vim-go after all. I found that any |
I just had the same issue and was able to reproduce it. The symptom happens when I am using tmux. |
I ran into this problem, too. My issue was apparently that |
I ran into this issue as well, but was able to fix it by running |
Actual behavior
When GoImports is set to run when the file is saved (or perhaps more accurately, when GoFmt is run), vim-go complains with the following: "vim-go: goimports does not support srcdir." and the file is cleared and overwritten.
I have run
:GoUpdateBinaries
, but the problem persists.Expected behavior
GoImports would function normally without the error message, or at least not clear the file when it fails.
Steps to reproduce:
let g:go_fmt_command = "goimports"
to your .vimrc so that GoImports is triggered on save.:w
Configuration
vimrc
you used to reproduceThe text was updated successfully, but these errors were encountered: