Install Go (command below is for Arch based distros).

sudo pacman -S go

Install the Go extension for VSCodium or VSCode if you’re using either: Open VSCodium, go to the Extensions panel, and search for "Go" by the Go team (extension ID: golang.go). Install it.

Install gopls and the Go tools (for autocompletion, inline error and warning diagnostics, etc..):

Open the Command Palette (Ctrl+Shift+P) and run:

Go: Install/Update Tools

Select all tools and click OK. This installs gopls (the official Go language server) and other essentials. gopls includes built-in linting via go vet and static analysis out of the box.

Install golangci-lint for linting (a must):

curl -sSfL https://golangci-lint.run/install.sh | sh -s -- -b $(go env GOPATH)/bin

Also make sure $GOPATH/bin is in your PATH. Add this to your ~/.bashrc or ~/.zshrc if needed:

export PATH="$PATH:$(go env GOPATH)/bin"

Open your VSCodium settings.json (Ctrl+Shift+P → "Open User Settings JSON") and add:

"go.lintTool": "golangci-lint",
"go.lintOnSave": "package",
"go.lintFlags": ["--fast-only"]

You can add additional lint checks using the go.lintOnSave setting and configuring your choice of linting tool using the go.lintTool setting.