8 ms·
Maintainer of the extension here. Happy to answer any questions about VS Code or the Go support specifically.
by lukehoban 11y ago
Maintainer of the extension here. Happy to answer any questions about VS Code or the Go support specifically.
- ngrilly 11y agoAre you employed by Microsoft? I'm asking because the repo is hosted under github.com/Microsoft.
- lukehoban 11y agoYes.
- ngrilly 11y agoOk :-)
- tejinderss 11y agoIs there a plan to release python plugin as well??
- lukehoban 11y agoThere is a Python plugin for VS Code available already [0]. I believe the PTVS folks are also working on a plugin for VS Code as well [1]. [0] https://marketplace.visualstudio.com/items?itemName=donjayamanne.python https://marketplace.visualstudio.com/items?itemName=donjayam... [1] https://news.ycombinator.com/item?id=10589451 https://news.ycombinator.com/item?id=10589451
- kennymeyers 11y agoWhat's the roadmap for the extension?
- iends 11y agoHow does it play with things like glide, gb, and godeps?
- squar1sm 11y agoI don't think it does. I'm trying to find flags or anything to make it know what gb is. In the gopath, things just work. In a gb project it just says "no buildable files" because it doesn't know to do `gb build`. Tried some other projects like atocker but then they don't seem to play nice with docker-machine.
- bigdubs 11y agoCan jump to definition jump to a definition in an open file instead of opening a duplicate file? Is this handled within the extension or vscode itself? Thanks for the hard work btw, vscode+go has made my team much more productive.
- lukehoban 11y agoGo to Definition will navigate to the definition in an existing open document or open the document if needed. This works across packages in your GOPATH, and also for core Go APIs in GOROOT. This is all handled in VS Code itself through it's (relatively high-level) extension API[0]. [0] https://code.visualstudio.com/docs/extensionAPI/vscode-api#DefinitionProvider https://code.visualstudio.com/docs/extensionAPI/vscode-api#D...
- nulltype 11y agoHi! I made some Go customizations for atom, and there were a few things that I thought worked pretty well, maybe consider adding them to this project: 1) Auto GOPATH detection: since all code is located underneath a canonical GOPATH, if the GOPATH is not set, traverse upward a few directories until you find one with a "src" folder in it. This means that I don't have to launch it from a terminal and deal with environment variables. Also, I use a GOPATH per project, so as long as each window auto-detects its own GOPATH, that works great. 2) Cross-compile all the tools (gocode, etc) for the most common platforms, presumably windows and mac, and include them in the extension so that it doesn't rely on auto-install or whatever and just works out of the box.
- lukehoban 11y agoThanks. #2 is something we definitely want to do with the VS Code extension as well. https://github.com/Microsoft/vscode-go/issues/5 https://github.com/Microsoft/vscode-go/issues/5 #1 is also a good idea, we currently offer a per-project setting to configure this, but could also guess better in the case that no GOPATH is set.
- sethammons 11y agoOne of my required features is seeing the method signature when my cursor is on the method name; I don't want to have to enter a command to see the signature. In sublime, the bottom bar will passively show me `func Unmarshal(data []byte, v interface{}) error` when I cursor over json.Unmarshal. I'd really like it if it also showed me the type of the variable I was cursored over, but I digress. Is this possible in your extension?
- lukehoban 11y agoYes - the vscode-go extension will show you function signatures (and type definitions and other symbol definitions) on hover. If you hold down `cmd`/`ctrl` during hover you additionally get a preview of the definition source code (signature and implementation).
- _ph_ 11y agoThanks for this extension, but I struggle with setting it up. How would one build a Go program from inside the IDE? My go program is git controlled, but the IDE does not seem to notice it. Thanks.
- ridiculous_fish 11y agoHi! My Go project directory has ~2 million data files under a directory called test. When I open the project directory, VS Code starts going through all of them, consuming a lot of memory and IO bandwidth. Is there a way to make it ignore that directory? I tried "files.exclude" which hides it from the sidebar, but VS Code still tries to walk the entire directory tree.
- lukehoban 11y agoI'd love to get more details on this. Open an issue on GitHub?
- ridiculous_fish 11y agohttps://github.com/Microsoft/vscode/issues/3703 https://github.com/Microsoft/vscode/issues/3703 . Thanks!
- brunomvsouza 11y agoHi there! I'm giving the Go plugin (latest) for VS Code (latest) a try but I'm not being able to rename code occurrences. "Cannot rename due to errors: Error: Command failed /foo/go/bin/gorename -offset /Users/foo/go/src/github.com/foo/hello/hello.go:#79 -to helloNurse" "rename: -offset \"/Users/foo/go/src/github.com/foo/hello/hello.go:#79\": no identifier at this position" Do I have to do anything specific for it to work or it should just work? Found a related issue (https://github.com/Microsoft/vscode-go/issues/165 https://github.com/Microsoft/vscode-go/issues/165) which led me to (https://github.com/Microsoft/vscode/issues/1580 https://github.com/Microsoft/vscode/issues/1580) which is already merged, but I'm still not able to rename symbols. Code: (tried to rename helloWorld to helloNurse) ''' package main import ( "fmt" ) func main() { helloWorld() } func helloWorld() { fmt.Printf("hello, world\n") } '''
- brunomvsouza 11y agoJust in case anyone else got stuck in same matter, I got a reply here https://github.com/Microsoft/vscode-go/issues/165#issuecomment-193548533 https://github.com/Microsoft/vscode-go/issues/165#issuecomme....