<p>I just installed visual studio code with golang on my macbook but I can't get "go to definition" to work for external packages. I had it working on my windows pc and it works for a colleague of mine. I have intellisense for these packages. Someone has any idea what can be causing this?</p>
<hr/>**评论:**<br/><br/>rr1pp3rr: <pre><ul>
<li>Is your go plugin installed?</li>
<li>Is your go version configured?</li>
<li>Did you run vscode with the proper GOPATH environment variable?</li>
</ul>
<p>I remember having to run some command in vscode to have a 'code' command line app which would launch it, so that it would have my GOPATH from my shell when it ran.</p></pre>Muanh: <pre><p>I got it to work for the most part, for one package it is still not working (gorilla/mux).</p></pre>rr1pp3rr: <pre><p>I've contributed to that package. Stopped using it when I put in a pr to fix their broken http codes on invalid matches, and after much bs they just let it sit there.</p>
<p>Switched to gocraft web and haven't looked back. My contributions there were really accepted. Yay for explicit context!</p>
<p>Edit: lol I just looked and the pr is still open! Hahahahaha </p></pre>picardo: <pre><blockquote>
<p>I remember having to run some command in vscode to have a 'code' command line app which would launch it, so that it would have my GOPATH from my shell when it ran.</p>
</blockquote>
<p>I think I need to do something similar to this. Do you have a link that gives a more in-depth explanation of how to do that? </p></pre>rr1pp3rr: <pre><p><a href="http://stackoverflow.com/questions/29971053/how-to-open-visual-studio-code-from-the-command-line-on-osx" rel="nofollow">http://stackoverflow.com/questions/29971053/how-to-open-visual-studio-code-from-the-command-line-on-osx</a></p></pre>Matthias247: <pre><p>For me it's working for packages that are in the gopath and the standard library, but unfortunately it's not yet working for vendored packages. Maybe you have one of those?</p></pre>Muanh: <pre><p>I think it is related to this. I pulled the source from our repository. But even after I go get all the packages it is still not working for that one package.</p></pre>dsiemon: <pre><p>Did you 'go install' it? This is required to get code completion with vim-go.</p></pre>Muanh: <pre><p>Thanks, I can try that. I'll let you know in a few days when I'm back at the office.</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传