Skip to content

[Feature Request] Changes to Reference CodeLens. #4551

@BlueStaggo

Description

@BlueStaggo

Code Lens are a bit ugly when they're used a lot, which is what OmniSharp does. Wouldn't it be great if they were to be improved?

Here are my problems:

  1. Enums look horrible:
    image
  2. 0 References just looks annoying here:
    image
  3. Am I going to use these anywhere except inside the only class they can be accessed in?:
    image
  4. Code Lens looks too much like a whole line (reducing the font size doesn't help):
    2021-05-16 10-07-02

So, here are some solutions with some mockups:

  1. Remove reference Code Lens from enum items:
    image
  2. Add an option to disable Code Lens if there are no references:
    image
  3. Add an option to disable Code Lens for private and/or protected members:
    image
  4. Add an option to use Line Lens instead (what the Ionide extension uses):
    image

There can also be an alternative solution to all this: put the reference Code Lens inside the gutter:
image

If you can't do this due to some limitations, I'll report this as an issue on Visual Studio Code.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions