Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Configurable Code Lens position #4836

Open
danielsig opened this issue Oct 21, 2021 · 0 comments
Open

[Feature Request] Configurable Code Lens position #4836

danielsig opened this issue Oct 21, 2021 · 0 comments

Comments

@danielsig
Copy link

Problem

For a few years now, a feature request has been poping up at VS team, VS Code team, and here at omnisharp-vscode about the position of Code Lens, specifically to have it above attributes. It is my understanding that the current location is by design and that not being able to configure it is also by design. I have read and disagreed with arguments for the former, but not seen any arguments for the latter.

Personally I dislike the current inconfigurable design so much that I'm sometimes willing to have 140 column width lines just to have the attribute in the same line as the property/method declaration. It's horribly ugly, but IMO more readable in certain circumstances.

Current behavior

Code Lens acts as a separator between the member and its attributes/comments.

Code Lens position is fixed

I have to choose between this:
Ugly choice number 1

and this:
Ugly choice number 2

Proposed behavior

Proposal 1

being able to place Code Lens above attributes

I propose making the maximum number of lines that Code Lens can appear above the declaration configurable, with 0 as default.
This means that Code Lens appears at the top unless the number of lines of attributes/comment above the declaration exceeds the given number, in which case the Code Lens will appear right above the declaration.
I also propose making separate configurations for # references and run test | debug test, making this possible:
Separate configuration for references and testing

Proposal 2

Being able to configure Code Lens to appear inline, mentioned in #4551 and microsoft/vscode#23652 like so:
inline references 1
inline references 2

Proposal 3

Another proposal in #4551 and microsoft/vscode#23652 about placing references in the gutter:
gutter references count
gutter references icon

Final Proposal

If all the feature requests up til now and proposals are a no go, then at least please consider making a public API for configuring Code Lens for C# so that extension developers can make this possible.

Here's the closest we have gotten to making this a reality:
#1938
#429

Please consider!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants