Skip to content

goplus/vscode-gop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go/Go+ for Visual Studio Code

GitHub release Language

The VS Code Go/Go+ extension provides rich language support for the Go programming language and the Go+ programming language.

Please file a new issue if you encounter any problems.

Quick Start

Welcome! 👋🏻
Whether you are new to Go/Go+ or an experienced Go/Go+ developer, we hope this extension fits your needs and enhances your development experience.

  1. Install Go 1.18 or newer if you haven't already.

  2. Install Go+ 1.1.13 or newer if you haven't already.

  3. Install the VS Code Go/Go+ extension.

  4. Open any directory or workspace containing Go/Go+ code to automatically activate the extension. The Go/Go+ status bar appears in the bottom left corner of the window and displays your Go/Go+ version.

  5. The extension depends on go, gop, goxls, dlv and other optional tools. If any of the dependencies are missing, the ⚠️ Analysis Tools Missing warning is displayed. Click on the warning to download dependencies.

    See the tools documentation for a complete list of tools the extension depends on.


(Install Missing Tools)

You are ready to Go :-)    🎉🎉🎉

What's next

If you are new to Go/Go+, this article provides the overview on Go+ code organization and basic gop commands. Watch ["Getting started with VS Code Go/Go+"] for an explanation of how to build your first Go/Go+ application using VS Code Go/Go+.

Feature highlights

  • IntelliSense - Results appear for symbols as you type.
  • Code navigation - Jump to or peek at a symbol's declaration.
  • Code editing - Support for saved snippets, formatting and code organization, and automatic organization of imports.
  • Diagnostics - Build, vet, and lint errors shown as you type or on save.
  • Enhanced support for testing and debugging

See the full feature breakdown for more details.


(Code completion and Signature Help)

In addition to integrated editing features, the extension provides several commands for working with Go files. You can access any of these by opening the Command Palette (Ctrl+Shift+P on Linux/Windows and Cmd+Shift+P on Mac), and then typing in the command name. See the full list of commands provided by this extension.


(Toggle Test File)

We recommend enabling semantic highlighting by turning on Goxls' ui.semanticTokens setting. "goxls": { "ui.semanticTokens": true }

Setting up your workspace

The VS Code Go/Go+ extension supports both GOPATH and Go/Go+ modules modes.

Go/Go+ modules are used to manage dependencies in recent versions of Go/Go+. Modules replace the GOPATH-based approach to specifying which source files are used in a given build, and they are the default build mode in go1.16+. We highly recommend Go development in module mode. If you are working on existing projects, please consider migrating to modules.

Unlike the traditional GOPATH mode, module mode does not require the workspace to be located under GOPATH nor to use a specific structure. A module is defined by a directory tree of Go/Go+ source files with a go.mod or gop.mod file in the tree's root directory.

Your project may involve one or more modules. If you are working with multiple modules or uncommon project layouts, you will need to configure your workspace by using Workspace Folders. See the Supported workspace layouts documentation for more information.

Contributing

We welcome your contributions and thank you for working to improve the Go/Go+ development experience in VS Code. If you would like to help work on the VS Code Go/Go+ extension, see our contribution guide to learn how to build and run the VS Code Go extension locally and contribute to the project.

License

MIT