Is there a way to have an indicator referring to the interface that a function implements and to see where an interface is implemented? #1735
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
If you run "Find All Implementations" from the struct type, vscode will show the list of interfaces the type implements. There is no visual indicator though. |
Beta Was this translation helpful? Give feedback.
-
I agree, I was looking for the same thing. These are those small features that once you get used to them, you can't live without. |
Beta Was this translation helpful? Give feedback.
-
I ran into the same issue and ended up making a small VS Code extension that shows a CodeLens with the number of implementations above interfaces and methods. It uses You can try it out on the Marketplace https://marketplace.visualstudio.com/items?itemName=xiaoxuxxxx.gogo-codelens or build the .vsix locally from here https://github.com/xiaoxuxxxx/gogo-codelens?tab=readme-ov-file#option-2-build-and-install-locally |
Beta Was this translation helpful? Give feedback.
If you run "Find All Implementations" from the struct type, vscode will show the list of interfaces the type implements.
If you run "Find All Implementations" from a method, vscode will show the list of corresponding interfaces.
This is not very intuitive but it looks like this was an attempt to fit Go-specific information in the general purpose LSP concept back then.
golang/go#35550
There is no visual indicator though.