vscode-csharp
vscode-csharp copied to clipboard
Implementation CodeLens (`ImpLens`)
The Issue
When implementing an interface
/ abstract class
, it can be very obscure which members are actually implementing it.
Describe the solution you would like
Add a CodeLens above the member implementing the interface
.
Here is an example of a CodeLens (the CodeLens is the small text saying references
):
The CodeLens ideally should have a special symbol next to it.
Example of desired CodeLens:
Implements IEnumerable<int>
public bool MoveNext() => position < _people.Length;
Applicable Scenarios
Ideally, there should be a setting for this (disabled by default).
This will apply to any member that is an implementation of an interface
/ abstract class
.
This feature is similar in spirit to a feature we implemented on the VS side - inheritance margin.
VSCode unfortunately does not allow us to add that information in the margin, so we'd have to put it somewhere else (codelens being a potential option).
While I don't think we'll be tackling this in the short term, I'll leave this issue open to collect feedback as its definitely an interesting feature request.
Implement the Type Hierarchy provider! https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_prepareTypeHierarchy
Implement the Type Hierarchy provider!
What does that do?
Does it provide CodeLens?
What does that do?
The Java extension implements it and it provides links to go to Super/Sub-class from the quick info popup.
Okay, but I would still prefer a CodeLens as well, since I'm after a visual indication without having to use the hover.