Migrating from Visual Studio Code to GoLand
This guide aims to provide a transition plan for developers moving from Visual Studio Code to GoLand.
Visual Studio Code (VS Code) is a widely used, lightweight, and flexible editor that supports a multitude of programming languages, including Go through extensions. It is favored for its simplicity, extensive plugin ecosystem, and community support. GoLand is a specialized Integrated Development Environment (IDE) from JetBrains, designed specifically for the Go language. GoLand offers comprehensive tools and features such as intelligent code completion, ergonomic design, and integrated debugging tools that enhance Go development.
Contents of the current guide
This guide covers the following topics:
Preparing for migration: before migrating from Visual Studio Code to GoLand, back up all projects and configurations to prevent data loss and allow restoration to the original setup if needed.
Installing and configuring GoLand: to install and configure GoLand, use the JetBrains Toolbox App for easy management of multiple product installations, updates, and version rollbacks. After installation, configure the Go SDK by selecting either a local copy or downloading directly from GoLand's settings. Additionally, you can customize the IDE by setting up a preferred keymap, such as the VS Code keymap, and installing plugins from the JetBrains Marketplace to enhance functionality.
Differences in user interfaces: when transitioning from Visual Studio Code to GoLand, you will notice differences in their user interfaces. This topic describes the most noticeable of them.
Differences in workflows: this section outlines the workflow differences between the two IDEs. For example, with GoLand, you have no need for a manual save shortcut, as the IDE automatically saves your work based on specific triggers, such as closing a file or changing the IDE's focus.
Why migrate to GoLand?
Consider the following reasons when deciding to migrate to GoLand:
Smooth setup and settings transfer: GoLand makes onboarding seamless by automatically importing your VS Code settings, such as keymap configurations. If your keymap settings are not transferred, you can set them manually to maintain your coding speed and muscle memory. To adjust your keymap, navigate to and select the layout that best suits your workflow. For more information about setting your keymap, refer to Setting a Visual Studio Code keymap.
Bundled debugger: GoLand integrates a powerful debugger directly within the IDE, eliminating the need to configure external JSON files, which is a common requirement in VS Code.
Full-line code completion: AI-powered code completion that is completely free and runs locally without sending any data over the internet.
Refactoring options: GoLand offers intelligent refactoring capabilities tailored for Go developers. Refactoring tools include:
Rename: safely changes variable names, functions, and package names throughout your entire project.
Change signature: modifies function signatures with automatic correction of all call sites.
Extract refactorings: turns chunks of code into reusable methods, making your code more readable and maintainable.
Inline: replaces redundant method calls with the actual method content when more straightforward code is preferable.
Move: relocates functions, methods, or types to different packages or files to improve project structure.
Safe delete: removes elements safely by checking for existing usages and dependencies.
Terraform and OpenTofu support: for developers working with infrastructure as code, GoLand provides robust support for both Terraform and OpenTofu. The plugin includes code completion, live templates, quick documentation, and navigation tools.
Intentions and quick-fixes: GoLand offers context-aware suggestions and automatic fixes. These include implementing interface methods, converting between loop styles, or suggesting improvements that follow Go best practices.
Built-in testing functionality: run and debug tests directly in the IDE with rich output, quick navigation to failed tests, and test coverage reports—all without additional configuration.
Bundled Database and SQL tools: connect to and manage databases, browse data, and write SQL queries with syntax highlighting, completion, and code inspection—all without leaving the IDE.
Kubernetes support: easily connect to and manage Kubernetes clusters directly in the IDE. GoLand provides an integrated UI for interacting with resources, viewing logs, and managing deployments.
IdeaVim plugin: Vim users can enable the IdeaVim plugin to benefit from the Vim emulation, integrated directly into the IDE.