GoGo CodeLensA VS Code extension that adds CodeLens annotations to your Go code. showing reference counts, interface implementations, and method relationships inline. Features
InstallationOption 1: Install from VS Code MarketplaceYou can download it from https://marketplace.visualstudio.com/items?itemName=xiaoxuxxxx.gogo-codelens Option 2: Build and Install LocallyIn case you don't trust my provided bundle vsix file (you should not trust any unknown extension in marketplace). Here's step to build PrerequisiteBuild extension file
and your Install from locally build file
ConfigurationYou can configure the extension in your VS Code Main switch configuration
Function Configuration -
|
Enable Only references |
---|
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.function.references.isEnabled |
Enable CodeLens annotations above functions to show how many times they are referenced. | true |
gogoCodeLens.codelens.function.references.singularTemplate |
Template text displayed above a function with exactly one reference. | {{ count }} reference |
gogoCodeLens.codelens.function.references.pluralTemplate |
Template text displayed above a function with multiple references. | {{ count }} references |
gogoCodeLens.codelens.function.references.emptyText |
Text displayed above a function when no references are found. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Interface Configuration - references
Enable Only references |
Enable Both implementBy and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.interface.references.isEnabled |
Enable CodeLens annotations above interfaces to show how many times they are referenced. | true |
gogoCodeLens.codelens.interface.references.singularTemplate |
Template text displayed above an interface with exactly one reference. | {{ count }} reference |
gogoCodeLens.codelens.interface.references.pluralTemplate |
Template text displayed above an interface with multiple references. | {{ count }} references |
gogoCodeLens.codelens.interface.references.emptyText |
Text displayed above an interface when no references are found. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Interface Configuration - implementBy
Enable Only implementBy |
Enable Both implementBy and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.interface.implementBy.isEnabled |
Enable CodeLens annotations above interfaces to show how many types implement them. | true |
gogoCodeLens.codelens.interface.implementBy.singularTemplate |
Template text displayed above an interface with exactly one implementation. | "↓↓ implemented below |
gogoCodeLens.codelens.interface.implementBy.pluralTemplate |
Template text displayed above an interface with multiple implementations. | ↓↓ implemented by {{ count }} |
gogoCodeLens.codelens.interface.implementBy.emptyText |
Text displayed above an interface when no implementations are found. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Child method interface Configuration - references
Enable Only references |
Enable Both implementBy and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.childMethodInterface.references.isEnabled |
Enable CodeLens annotations above interface methods to show how many times they are referenced. | true |
gogoCodeLens.codelens.childMethodInterface.references.singularTemplate |
Template text displayed above an interface method with exactly one reference. | {{ count }} reference |
gogoCodeLens.codelens.childMethodInterface.references.pluralTemplate |
Template text displayed above an interface method with multiple references. | {{ count }} references |
gogoCodeLens.codelens.childMethodInterface.references.emptyText |
Text displayed above an interface method when no references are found. Leave empty to disable the annotation. | 0 references |
Child method interface Configuration - implementBy
Enable Only implementBy |
Enable Both implementBy and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.childMethodInterface.implementBy.isEnabled |
Enable CodeLens annotations above interface methods to show how many types implement them. | true |
gogoCodeLens.codelens.childMethodInterface.implementBy.singularTemplate |
Template text displayed above an interface method with exactly one implementation. | ↓↓ implemented below |
gogoCodeLens.codelens.childMethodInterface.implementBy.pluralTemplate |
Template text displayed above an interface method with multiple implementations. | ↓↓ implemented by {{ count }} |
gogoCodeLens.codelens.childMethodInterface.implementBy.emptyText |
Text displayed above an interface method when no implementations are found. Leave empty to disable the annotation. | no implementation |
Method Configuration - references
Enable Only references |
Enable Both implementFrom and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.method.references.isEnabled |
Enable CodeLens annotations above methods to show how many times they are referenced. | true |
gogoCodeLens.codelens.method.references.singularTemplate |
Template text displayed above a method with exactly one reference. | {{ count }} reference |
gogoCodeLens.codelens.method.references.pluralTemplate |
Template text displayed above a method with multiple references. | "{{ count }} references |
"gogoCodeLens.codelens.method.references.emptyText |
Text displayed above a method when no references are found. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Method Configuration - implementFrom
Enable Only implementFrom |
Enable Both implementFrom and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.method.implementFrom.isEnabled |
Enable CodeLens annotations above methods to show how many interface methods they implement. | true |
gogoCodeLens.codelens.method.implementFrom.singularTemplate |
Template text displayed above a method that implements exactly one interface method. | ↑↑ from interface |
gogoCodeLens.codelens.method.implementFrom.pluralTemplate |
Template text displayed above a method that implements multiple interface methods. | ↑↑ from interface ({{ count }}) |
gogoCodeLens.codelens.method.implementFrom.emptyText |
Text displayed above a method that does not implement any interface methods. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Struct Configuration - references
Enable Only references |
Enable Both implementFrom and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.struct.references.isEnabled |
Enable CodeLens annotations above structs to show how many times they are referenced. | true |
gogoCodeLens.codelens.struct.references.singularTemplate |
Template text displayed above a struct with exactly one reference. | {{ count }} reference |
gogoCodeLens.codelens.struct.references.pluralTemplate |
Template text displayed above a struct with multiple references. | {{ count }} references |
gogoCodeLens.codelens.struct.references.emptyText |
Text displayed above a struct when no references are found. Leave empty to disable the annotation. | (empty — hides CodeLens) |
Struct Configuration - implementFrom
Enable Only implementFrom |
Enable Both implementFrom and references |
---|---|
![]() |
![]() |
Setting | Description | Default |
---|---|---|
gogoCodeLens.codelens.struct.implementFrom.isEnabled |
Enable CodeLens annotations above structs to show how many interfaces they implement. | true |
gogoCodeLens.codelens.struct.implementFrom.singularTemplat |
Template text displayed above a struct that implements exactly one interface. | ↑↑ from interface |
gogoCodeLens.codelens.struct.implementFrom.pluralTemplate |
Template text displayed above a struct that implements multiple interfaces. | ↑↑ from interface ({{ count }}) |
gogoCodeLens.codelens.struct.implementFrom.emptyText |
Text displayed above a struct that does not implement any interfaces. Leave empty to disable the annotation. | (empty — hides CodeLens) |