← back

Go error folding in VSCode

2026-08-05

Error handling in Go is very verbose. GoLand has a neat feature that allows it to collapse the standard if err != nil blocks automatically. Unfortunately, the standard Go extension in VSCode does not have this functionality. There are two open issues tracking some sort of feature to help with this.

The first is a feature about folding the error blocks exactly like in GoLand.

The second is about reducing the opacity of the blocks instead.

Unfortunately, both are waiting for 2 upstream VSCode changes, one of which has been open since 2016.

An extension provides support for lowering the transparency of Go error cases. This extension is called Lowlight Go Errors by Ozan Hanedan. For now, it’s the closest thing we can get to the superior GoLand functionality in VSCode.