Skip to content
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

Gofmt fails to find dependencies in the vendor directory #902

Closed
zachgersh opened this issue Jun 13, 2016 · 3 comments
Closed

Gofmt fails to find dependencies in the vendor directory #902

zachgersh opened this issue Jun 13, 2016 · 3 comments

Comments

@zachgersh
Copy link

Actual behavior

I attempt to auto import gopkg.in/yaml.v2 and instead I get nothing. Rolling back to v1.6 fixes the issue completely.

Expected behavior

gofmt auto imports the file like before

Steps to reproduce:

Please create a reproducible case of your problem. Re produce it
with a minimal vimrc with all plugins disabled and only vim-go
enabled:

  1. Install vim-go latest
  2. have a vendor directory
  3. write small main.go that attempt to import a dependency from vendor

Configuration

Add here your current configuration and additional information that might be
useful, such as:

  • nvim version: 0.1.4
  • vim-go version: latest-stable
  • go version: 1.6.2
@fatih
Copy link
Owner

fatih commented Jun 13, 2016

Hi @zachgersh

gofmt doesn't auto import dependencies. Did you add the following line to your vimrc:

let g:go_fmt_command = "goimports"

@zachgersh
Copy link
Author

Yessir! Works fine in 1.6 so there was some sort of regression. I could try to do a git-bisect to find the commit.

On Jun 13, 2016, at 2:05 PM, Fatih Arslan [email protected] wrote:

Hi @zachgersh

gofmt doesn't auto import dependencies. Did you add the following line to your vimrc:

let g:go_fmt_command = "goimports"

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@fatih
Copy link
Owner

fatih commented Jun 14, 2016

This is now fixed in master. Thanks for the feedback @zachgersh. I've renamed some of the variables to prevent a regression like this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants