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

GoDef does not work after setting GoBuildTags #1312

Closed
tgrosinger opened this issue Jun 1, 2017 · 2 comments
Closed

GoDef does not work after setting GoBuildTags #1312

tgrosinger opened this issue Jun 1, 2017 · 2 comments
Labels

Comments

@tgrosinger
Copy link
Contributor

Behavior

Setting :GoBuildTags integration does not cause ":GoDef" to correctly find a definition that is in a tagged file.

Write here what's happening and what you're expecting instead of...

Steps to reproduce:

  1. Create a file A.go in package testutils with // +build integration unit at the top. Create a function in this file.
  2. Create file B_test.go in package myapp with // +build integration at the top. In it, create a function with a call to the function in file A.go
  3. Place the cursor over the function call in B_test.go, and run :GoDef

Expected: Jump to function definition in A.go
Actual: red message at the bottom saying "vim-go: "

Configuration

fatih added a commit that referenced this issue Jun 6, 2017
It was using a deprecated flag.

Fixes #1312
@fatih fatih added the bug label Jun 6, 2017
@fatih
Copy link
Owner

fatih commented Jun 6, 2017

Hi @tgrosinger

Thanks for the report. It's now fixed with: #1319

Be sure you use guru for the :GoDef command as godef doesn't have support for build tags:

let g:go_def_mode = "guru"

Thanks

@tgrosinger
Copy link
Contributor Author

Works for me! Thank you.

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

No branches or pull requests

2 participants