microsoft / vscode-go

An extension for VS Code which provides support for the Go language. We have moved to https://github.com/golang/vscode-go
Other
5.93k stars 648 forks source link

Way to disable go.mod codelens #3181

Closed mbertschler closed 4 years ago

mbertschler commented 4 years ago

My go.mod file shows code lens lines that look like Upgrade dependency to ....

I would like to have the option to remove them, maybe with the same config that can remove the other codelens features:

    "go.enableCodeLens": {
        "references": false,
        "runtest": false,
        "go.mod": false,
    },
hyangah commented 4 years ago

Try

   "[go.mod]": {
        "editor.codeLens": false
    }

For go files, use "[go]". Currently, there is no way to fine-control code lens behavior yet.

hyangah commented 4 years ago

Let's follow up in golang/go#38339 (specific to the current go.mod codelens behavior) and golang/go#36787 (which will require changes in vscode-go side to use codelens info from gopls instead of its custom codelens)

@stamblerre

mbertschler commented 4 years ago

@hyangah thanks for that quick suggestion, does exactly what I want!