dotnet / dotnet/vscode-csharp

Feature Request: Add option "Csharp › References Code Lens: Hide private"

Open
#4,667 0 comments 0 reactions 0 assignees View on GitHub
OmniSharp
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

## Issue Description ##
I would like to be able to hide references for private members. My classes are very small so I don't find any benefit of having a reference count inside the private members. I would suggest to add a "Csharp › References Code Lens: Hide private" option to hide private members. Additionally filters for protected/internal could be added. But I think a filter for private members is a good start.

## Steps to Reproduce ##

## Expected Behavior ##

## Actual Behavior ##

## Logs ##

### OmniSharp log ###
Post the output from Output-->OmniSharp log here

### C# log ###
Post the output from Output-->C# here

## Environment information ##

**VSCode version**: 1.58.2
**C# Extension**: 1.23.13

Dotnet Information
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829

Runtime Environment:
OS Name: Windows
OS Version: 10.0.19043
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\

Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7

.NET SDKs installed:
3.1.100 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download

Visual Studio Code Extensions

|Extension|Author|Version|
|---|---|---|
|cpptools|ms-vscode|1.5.1|
|csharp|ms-dotnettools|1.23.13|
|csharp-format-usings|gaoshan0621|0.0.4|
|docomment|k--kato|0.1.20|
|dotenv|mikestead|1.0.1|
|EditorConfig|EditorConfig|0.16.4|
|eml|leighlondon|0.4.0|
|githistory|donjayamanne|0.6.17|
|gltf-vscode|cesium|2.3.11|
|gml-support|liaronce|1.7.4|
|jupyter|ms-toolsai|2021.8.1013163132|
|language-postcss|cpylua|1.1.0|
|language-x86-64-assembly|13xforever|3.0.0|
|laravel-artisan|ryannaddy|0.0.28|
|laravel-blade|onecentlin|1.25.0|
|laravel-extension-pack|onecentlin|1.0.0|
|laravel-extra-intellisense|amiralizadeh9480|0.6.1|
|laravel-goto-controller|stef-k|0.0.12|
|laravel-goto-view|codingyu|1.3.4|
|laravel5-snippets|onecentlin|1.13.0|
|lex-flex-yacc-bison|faustinoaq|0.0.3|
|msbuild-tools|sterin|0.0.12|
|mssql|ms-mssql|1.10.1|
|nunjucks|ronnidc|0.3.0|
|php-debug|felixfbecker|1.16.1|
|php-intellisense|felixfbecker|2.3.14|
|php-pack|felixfbecker|1.0.2|
|python|ms-python|2021.6.944021595|
|remote-wsl|ms-vscode-remote|0.58.2|
|remotehub|GitHub|0.11.0|
|shader|slevesque|1.1.5|
|tabnine-vscode|TabNine|3.4.14|
|unity-debug|Unity|3.0.2|
|vetur|octref|0.34.1|
|vscode-apache|mrmlnc|1.2.0|
|vscode-diff|fabiospampinato|1.4.2|
|vscode-docker|ms-azuretools|1.14.0|
|vscode-eslint|dbaeumer|2.1.23|
|vscode-icons|vscode-icons-team|11.5.0|
|vscode-intelephense-client|bmewburn|1.7.1|
|vscode-pylance|ms-python|2021.7.4|
|vscode-smart-column-indenter|lmcarreiro|0.0.13|
|vscode-sort-json|richie5um2|1.20.0|
|vscode-tailwindcss|bradlc|0.6.13|
|vscode-typescript-tslint-plugin|ms-vscode|1.3.3|
|vscode-unitymeta|PTD|0.0.7|
|vsliveshare|ms-vsliveshare|1.0.4580|;

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.