{"id":13495567,"url":"https://github.com/golang/vscode-go","last_synced_at":"2025-05-13T17:05:29.807Z","repository":{"id":37398008,"uuid":"245484280","full_name":"golang/vscode-go","owner":"golang","description":"Go extension for Visual Studio Code","archived":false,"fork":false,"pushed_at":"2025-05-08T19:10:05.000Z","size":134266,"stargazers_count":4036,"open_issues_count":409,"forks_count":795,"subscribers_count":108,"default_branch":"master","last_synced_at":"2025-05-08T20:24:30.186Z","etag":null,"topics":["debugger","golang","visual-studio-code","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=golang.Go","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":".github/SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-06T17:52:04.000Z","updated_at":"2025-05-08T19:44:54.000Z","dependencies_parsed_at":"2023-10-14T16:41:34.855Z","dependency_job_id":"a505db6c-fc55-4baa-902b-c64acd8b32a6","html_url":"https://github.com/golang/vscode-go","commit_stats":{"total_commits":3260,"total_committers":340,"mean_commits":9.588235294117647,"dds":0.7021472392638037,"last_synced_commit":"25448e0a5ef454054c35bd3979c44df7ac94bef1"},"previous_names":[],"tags_count":204,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fvscode-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fvscode-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fvscode-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang%2Fvscode-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang","download_url":"https://codeload.github.com/golang/vscode-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253990460,"owners_count":21995774,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugger","golang","visual-studio-code","vscode","vscode-extension"],"created_at":"2024-07-31T19:01:36.011Z","updated_at":"2025-05-13T17:05:24.783Z","avatar_url":"https://github.com/golang.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Editor Plugins","编辑器插件","Libraries for creating HTTP middlewares"],"sub_categories":["Routers","路由器","Search and Analytic Databases","代码分析"],"readme":"# Go for Visual Studio Code\n\n[![Slack](https://img.shields.io/badge/slack-gophers-green.svg?style=flat)](https://gophers.slack.com/messages/vscode/)\n\n\u003c!--TODO: We should add a badge for the build status or link to the build dashboard.--\u003e\n\n[The VS Code Go extension](https://marketplace.visualstudio.com/items?itemName=golang.go)\nprovides rich language support for the\n[Go programming language](https://go.dev/).\n\n## Requirements\n\n* Visual Studio Code 1.75 or newer (or editors compatible with VS Code 1.75+ APIs)\n* Go 1.21 or newer.\n\n## Quick Start\n\nWelcome! 👋🏻\u003cbr/\u003e\nWhether you are new to Go or an experienced Go developer, we hope this\nextension fits your needs and enhances your development experience.\n\n1.  Install [Go](https://go.dev) 1.21 or newer if you haven't already.\n\n1.  Install the [VS Code Go extension].\n\n1.  Open any Go file or go.mod file to automatically activate the extension. The\n    [Go status bar](https://github.com/golang/vscode-go/wiki/ui) appears in the\n    bottom right corner of the window and displays your Go version.\n\n1.  The extension depends on `go`, `gopls` (the Go language server), and optional\n    tools depending on your settings. If `gopls` is missing, the extension will\n    try to install it. The :zap: sign next to the Go version indicates\n    the language server is running, and you are ready to go.\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/images/gettingstarted.gif\" width=75%\u003e\n\u003cbr/\u003e\n\u003cem\u003e(Install Missing Tools)\u003c/em\u003e\n\u003c/p\u003e\n\nYou are ready to Go :-) \u0026nbsp;\u0026nbsp; 🎉🎉🎉\n\n## What's next\n\n* Explore more [features][full feature breakdown] of the VS Code Go extension.\n* View the\n  [settings documentation](https://github.com/golang/vscode-go/wiki/settings)\n\tand [advanced topics](https://github.com/golang/vscode-go/wiki/advanced) to\n\tcustomize the extension.\n* View the [tools documentation](https://github.com/golang/vscode-go/wiki/tools)\n  for a complete list of tools the VS Code Go extension depends on. You can\n  install additional tools and update them by using \"Go: Install/Update Tools\".\n* Solve issues with the\n  [general troubleshooting](https://github.com/golang/vscode-go/wiki/troubleshooting)\n\tand [debugging troubleshooting](https://github.com/golang/vscode-go/wiki/debugging#troubleshooting)\n\tguides.\n* [file an issue](https://github.com/golang/vscode-go/issues/new/choose) for\n  problems with the extension.\n* Start a [GitHub discussion](https://github.com/golang/vscode-go/discussions)\n  or get help on [Stack Overflow].\n* Explore Go language resources on [go.dev/learn](https://go.dev/learn) and\n  [golang.org/help](https://golang.org/help).\n\nIf you are new to Go, [this article](https://golang.org/doc/code.html) provides\nthe overview on Go code organization and basic `go` commands. Watch [\"Getting\nstarted with VS Code Go\"] for an explanation of how to build your first Go\napplication using VS Code Go.\n\n## Feature highlights\n\n* [IntelliSense] - Results appear for symbols as you type.\n* [Code navigation] - Jump to or peek at a symbol's declaration.\n* [Code editing] - Support for saved snippets, formatting and code organization,\n  and automatic organization of imports.\n* [Diagnostics] -  Build, vet, and lint errors shown as you type or on save.\n* Enhanced support for [testing] and [debugging]\n\nSee the [full feature breakdown] for more details.\n\n\u003cp align=center\u003e\n\u003cimg src=\"docs/images/completion-signature-help.gif\" width=75%\u003e\n\u003cbr/\u003e\n\u003cem\u003e(Code completion and Signature Help)\u003c/em\u003e\n\u003c/p\u003e\n\nIn addition to integrated editing features, the extension provides several\ncommands for working with Go files. You can access any of these by opening the\nCommand Palette (`Ctrl+Shift+P` on Linux/Windows and `Cmd+Shift+P` on Mac), and\nthen typing in the command name. See the\n[full list of commands](https://github.com/golang/vscode-go/wiki/commands#detailed-list) provided by this\nextension.\n\n\u003cp align=center\u003e\n\u003cimg src=\"docs/images/toggletestfile.gif\" width=75%\u003e\n\u003cbr/\u003e\u003cem\u003e(Toggle Test File)\u003c/em\u003e\u003c/p\u003e\n\n**⚠️ Note**: the default syntax highlighting for Go files is provided by a\n[TextMate rule](https://github.com/worlpaker/go-syntax) embedded in VS\nCode, not by this extension.\n\nFor better syntax highlighting, we recommend enabling\n[semantic highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide)\nby turning on [Gopls' `ui.semanticTokens` setting](https://github.com/golang/vscode-go/wiki/settings#uisemantictokens).\n    ```\n    \"gopls\": { \"ui.semanticTokens\": true }\n    ```\n\n## Setting up your workspace\n\nThe VS Code Go extension supports both `GOPATH` and Go modules modes.\n\n[Go modules](https://golang.org/ref/mod) are used to manage dependencies in\nrecent versions of Go. Modules replace the `GOPATH`-based approach to specifying\nwhich source files are used in a given build, and they are the default build\nmode in go1.16+. We highly recommend Go development in module mode. If you are\nworking on existing projects, please consider migrating to modules.\n\nUnlike the traditional `GOPATH` mode, module mode does not require the workspace\nto be located under `GOPATH` nor to use a specific structure. A module is\ndefined by a directory tree of Go source files with a `go.mod` file in the\ntree's root directory.\n\nYour project may involve one or more modules. If you are working with multiple\nmodules or uncommon project layouts, you will need to configure your workspace\nby using [Workspace Folders]. See the\n[Supported workspace layouts documentation] for more information.\n\n## Pre-release version\n\nIf you'd like to get early access to new features and bug fixes, you can use the\npre-release extension. Following the vscode's [convention](https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions),\nwe use the minor version of the extension version number to distinguish stable\nand pre-release versions (`0.ODD_NUMBER.patch` for pre-release, `0.EVEN_NUMBER.patch`\nfor stable release).\n\nTo install the pre-release version, use the drop-down list\nto select \"Install Pre-Release Version\", or if already installed the Go extension,\nuse the \"Switch to Pre-Release Version\" option in the Visual Studio Code\nextension management page. For more details about this mechanism, see the\n[Visual Studio Code's documentation](https://code.visualstudio.com/updates/v1_63#_pre-release-extensions).\n\n## Telemetry\n\nVS Code Go extension relies on the [Go Telemetry](https://go.dev/doc/telemetry) to\nlearn insights about the performance and stability of the extension and the\nlanguage server (`gopls`).\n**Go Telemetry data uploading is disabled by default** and can be enabled\nwith the following command:\n\n```\ngo run golang.org/x/telemetry/cmd/gotelemetry@latest on\n```\n\nAfter telemetry is enabled, the language server will upload metrics and stack\ntraces to [telemetry.go.dev](https://telemetry.go.dev). You can inspect what\ndata is collected and can be uploaded by running:\n\n```\ngo run golang.org/x/telemetry/cmd/gotelemetry@latest view\n```\n\nIf we get enough adoption, this data can significantly advance the pace of\nthe Go extension development, and help us meet a higher standard\nof reliability. For example:\n\n- Even with [semi-automated crash\n  reports](https://github.com/golang/vscode-go/issues?q=is%3Aissue+is%3Aopen+label%3AautomatedReport)\n  in VS Code, we've seen several crashers go unreported for weeks or months.\n- Even with [a suite of\n  benchmarks](https://perf.golang.org/dashboard/?benchmark=all\u0026repository=tools\u0026branch=release-branch.go1.20),\n  some performance regressions don't show up in our benchmark environment (such\n  as the [completion bug](https://go.dev/issue/62665) mentioned below!).\n- Even with [lots of great\n  ideas](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls+label%3Afeaturerequest)\n  for how to improve gopls, we have limited resources. Telemetry can help us\n  identify which new features are most important, and which existing features\n  aren't being used or aren't working well.\n\nThese are just a few ways that telemetry can improve gopls. The [telemetry blog\npost series](https://research.swtch.com/telemetry-uses) contains many more.\n\nGo telemetry is designed to be transparent and privacy-preserving. Learn more at\n[https://go.dev/doc/telemetry](https://go.dev/doc/telemetry).\n\n## Support Policy\n\nThe Go extension is maintained by engineers on the\n[Go tools team](https://github.com/orgs/golang/teams/tools-team/members),\nwho actively monitor the [VS Code Go](https://github.com/golang/vscode-go/issues)\nand the [Go](https://github.com/golang/go/issues?q=is%3Aissue+is%3Aopen+label%3Agopls)\nissue trackers.\n\nWe support only the latest stable and pre-release versions of the extension.\n\n### Supported Go and tools\n\nThe Go extension follows the [Go Release Policy](https://go.dev/doc/devel/release.html#policy),\nmeaning that it _officially_ supports the two most recent major Go releases.\nThe Go team maintains _best-effort_ support for the last three major Go versions.\n\nThe Go extension relies on [tools](https://github.com/golang/vscode-go/wiki/tools)\nlike `gopls` and `dlv` for its core functionalities and they have their own release\npolicy and schedule. We test only against the latest versions of these tools.\n\nIn case you need to work with an older version of Go, please check\nthe [Compatibility] page and manually install the compatible version of\nthe extension and tools.\n\n## Contributing\n\nWe welcome your contributions and thank you for working to improve the Go\ndevelopment experience in VS Code. If you would like to help work on the VS Code\nGo extension, see our\n[contribution guide](https://github.com/golang/vscode-go/wiki/contributing) to\nlearn how to build and run the VS Code Go extension locally and contribute to\nthe project.\n\n## Code of Conduct\n\nThis project follows the\n[Go Community Code of Conduct](https://golang.org/conduct). If you encounter a\nconduct-related issue, please mail conduct@golang.org.\n\n## License\n\n[MIT](LICENSE)\n\n[Stack Overflow]: https://stackoverflow.com/questions/tagged/go+visual-studio-code\n[`gopls`]: https://golang.org/s/gopls\n[`go`]: https://golang.org/cmd/go\n[Managing extensions in VS Code]: https://code.visualstudio.com/docs/editor/extension-gallery\n[VS Code Go extension]: https://marketplace.visualstudio.com/items?itemName=golang.go\n[Go installation guide]: https://golang.org/doc/install\n[\"Getting started with VS Code Go\"]: https://youtu.be/1MXIGYrMk80\n[IntelliSense]: https://github.com/golang/vscode-go/wiki/features#intellisense\n[Code navigation]: https://github.com/golang/vscode-go/wiki/features#code-navigation\n[Code editing]: https://github.com/golang/vscode-go/wiki/features#code-editing\n[Compatibility]: https://github.com/golang/vscode-go/wiki/compatibility\n[diagnostics]: https://github.com/golang/vscode-go/wiki/features#diagnostics\n[testing]: https://github.com/golang/vscode-go/wiki/features#run-and-test-in-the-editor\n[debugging]: https://github.com/golang/vscode-go/wiki/debugging#features\n[full feature breakdown]: https://github.com/golang/vscode-go/wiki/features\n[workspace documentation]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md\n[`Go: Install/Update Tools` command]: https://github.com/golang/vscode-go/wiki/commands#go-installupdate-tools\n[Supported workspace layouts documentation]: https://github.com/golang/tools/blob/master/gopls/doc/workspace.md\n[Workspace Folders]: https://code.visualstudio.com/docs/editor/multi-root-workspaces","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fvscode-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang%2Fvscode-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang%2Fvscode-go/lists"}