GoLand 2022.3 offers performance enhancements, as well as new features for generics and Go workspaces.
We’ve integrated Go Playground, added support for improvements to Go doc comments, introduced new features for HTTP Client and Docker, and made the new UI available.
As usual, you will find new features for web development and databases, like Redis support.
If you prefer an interactive approach to learning, we invite you to complete the What's New in GoLand 2022.3 tutorial from the Welcome screen.
Last but not least, GoLand turns 5 years old today and we invite you to celebrate with us. Type "Happy B-day, GoLand!" in GoLand 2022.3 or GoLand 2022.2.5 and see what happens!
go list
changes to improve indexing
When you open a project, GoLand indexes the files and runs the
go list
command,
which reports information about the project structure. Indexing is paused while go
list
is running,
and you don’t have access to code insight features until indexing is finished.
Previously, GoLand would run go list
twice in some cases.
We’ve changed our API and reduced the number of go list
launches.
We hope that this change significantly improves performance for large projects with many modules.
Now when you open a project,
the information reported by go list
is saved to the disk in cache memory.
When you open that project again, the data about the project’s structure
is loaded from memory and considered when indexing starts.
Thanks to this, indexing continues without pauses and finishes faster, and the code insight features are available much sooner after opening the project.
GoLand has received a number of other performance improvements designed to decrease the time it takes to launch applications and open projects in JetBrains IDEs.
As a result, overall startup performance – including editor restoration – has been improved by around 30%.
You can now generate tests for functions with generic parameters.
We now have an inspection that detects lowercase type parameters, as well as a quick-fix to make them uppercase.
In the New context menu,
you’ll now find the Go Workspace File action.
When you select it, a go.work
file will appear in your root folder.
Existing Go modules will automatically be added to the
go.work
file.
go.work
using replace
directives
You can now generate go.work
from go.mod
if you have replace
directives there.
Place the caret on a replace
directive,
press Alt+Enter to see all available intention actions,
and select the Add … module to workspace quick-fix.
Go 1.19 has added support for links, lists, and new headings in doc comments. GoLand 2022.3 also supports these new features.
We've added references to doc links in GoLand. Clicking on them leads to the referenced element, while clicking on a text link leads to a text-link definition.
Both text and doc links are rendered as links in the Quick Documentation popup and the Documentation tool window.
Starting from Go 1.19, a heading is a line that begins with a number sign (#
)
followed by a space and the heading text.
New headings are rendered as HTML headings in GoLand's Quick Documentation popup and the Documentation tool window.
Lists are rendered as HTML lists in GoLand's Quick Documentation popup and the Documentation tool window.
We've integrated the Go Playground functionality inside GoLand.
You can select a piece of code, choose the Open In option, and then click Playground. This will open a scratch file with a toolbar that contains the same options you have when using Go Playground.
You can format and share your code, change the Go version, run your code using the Go playground server, or run it locally.
If your type contains itself, you will get an "Invalid recursive type" error. To avoid this, you should include a pointer to a type, not a type itself. We now have a quick-fix for that.
We've started implementing the Code Vision feature. For now, the code authors are displayed if version control integration is enabled. If you click on a code author's name, the Annotate with Git blame sidebar opens, letting you see who introduced various changes.
We've also introduced usages displayed near all functions and types that show how many times the function or type is referenced in the current project.
GoLand now shows inlay hints for constant definition blocks. This is particularly useful
in iota
-derived constant blocks,
where the hints show the iota
values associated with each position.
The IDE now ignores auto-generated protocol buffer fields
that start with XXX_
when you invoke the Fill all fields intention action.
These fields are shown only after you invoke completion for the second time.
GoLand now automatically picks up system variables related to Go modules and displays them in the Environment variables dialog window. To open this window, go to Settings | Go | Go Modules and click on the Edit environment variables icon.
The IDE now always shows package names
in the Quick documentation popup for top-level declarations.
Previously, package headers were shown only when doc.go
or
<pkg_name>.go
files were found.
We've raised the file size limit from 2.5 MB to 10 MB. Code insight features, like navigation and highlighting, don't work for files that exceed the size limit.
While the 2.5 MB limit was enough for most files, there are projects with files bigger than that – for instance, the AWS SDK or GCP.
Since the Receiver names are different inspection
is not relevant for generated code, we've disabled it for
files that contain a comment matching the following regular expression:
^// Code generated .* DO NOT EDIT\.$
The HTTP Client now supports executing script blocks before requests. You can generate data before executing a request and put it in the final request using variables. A quick-fix is available that will create the boilerplate code for initializing variables.
The HTTP Client now supports the Crypto API. You can compute the md5 or sha1 hash values for HTTP requests.
For simple cases, the IDE now features a new set of random variables.
GoLand now supports connections to Docker that run in Windows Subsystem for Linux (WSL). You can set up such a connection in Settings | Build, Execution, Deployment | Docker.
There is now an easy way to pull a required image without
running it from a Dockerfile
or docker-compose.yml
.
For this, call up the context actions (Alt+Enter)
on the highlighted image name and then select Pull Docker image.
.dockerignore
file typeWe've introduced full support for .dockerignore
files, including code
highlighting and completion. These files are now taken
into account when you build an image from the IDE.
Here documents allow you to redirect subsequent
Dockerfile
lines to the input of the
RUN
or COPY
commands. GoLand now supports this syntax,
so you can use it to generate config files or
multiline scripts right in your Dockerfile
files.
You can now set up additional Docker connections using Docker Contexts if you already have these settings in your Docker config. You can do so by calling the Add Service context menu in the Services view and selecting Docker Connections From Docker Contexts.
Your IDE backend can now launch directly in WSL 2, and you can connect to it the same way you would connect to any remote machine when using remote development in GoLand.
As you may already know, this May we announced a closed preview program for the new UI in JetBrains IDEs.
We invite you to switch to the new UI in Settings | Appearance & Behavior | New UI Preview, give it a test drive, and share your thoughts about this change with us.
The preview functionality for intention actions is now switched on by default, so you can instantly see how your code will be altered once you apply the IDE's suggestions.
You can enable or disable the preview feature by pressing Ctrl+Q while the list of intention actions is open.
To make it easier to arrange your working space and interact with GoLand on multiple monitors, we've implemented the option to drag tool windows out of the main window and dock them to floating editor tabs.
We've enhanced the Tips of the Day feature, a learning tool that helps you explore GoLand.
Each tip now has a heading. We've also fine-tuned the algorithm that determines which tips appear so you'll see the ones that are most relevant to your experience with the IDE and the project you're working on.
It is again possible to bookmark files from editor tabs. Just right-click on a tab to invoke the context menu and select Bookmarks.
You can add all of the files in all currently open tabs to Bookmarks. To do this, either invoke the same context menu and select Bookmark Open Tabs, or call this action using the three dots icon located on the right-hand side of the editor tabs pane.
We've introduced a reworked solution to synchronize your custom user settings. For quite a long time, there were two plugins that existed in parallel and featured intersecting functionality – IDE Settings Sync and Settings Repository. To avoid the confusion from having two similar bundled plugins, we've merged their feature sets into a single solution – the new Settings Sync plugin.
You can find details about the new unified solution here.
Note: to learn about all of the updates for databases in the 2022.3 version, head over to the DataGrip What's New page.
A preliminary iteration of long-awaited support for Redis has been implemented.
Now, when using quick search, you also have the ability to filter objects. All non-matching objects will be hidden.
Note: to learn about all of the web development improvements in the 2022.3 version, head over to the WebStorm What's New page.
This version introduces the new Code Vision feature for web development. It gathers various metrics for types and type members in your JavaScript and TypeScript code and displays this information near their declarations.
There's a new quick-fix to suppress inspections with a
comment in YAML files, including Kubernetes files,
OpenAPI specifications, and docker-compose.yml
files.
We've also introduced an option to fold multiline comments
that make up a block of 3 or more lines and start with #
.
We've started distributing installers for Windows ARM64. You can already download them from our website or the Toolbox App.