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

Can not disable Reference Code Lens #6859

Closed
paulooliveira-muro opened this issue Feb 6, 2024 · 1 comment
Closed

Can not disable Reference Code Lens #6859

paulooliveira-muro opened this issue Feb 6, 2024 · 1 comment

Comments

@paulooliveira-muro
Copy link

paulooliveira-muro commented Feb 6, 2024

Type: Bug

Issue Description

I disable "Dotnet > Code Lens: Enable References Code Lens" and "Dotnet > Code Lens: Enable Tests Code Lens" and leave the default on "Editor: Code Lens" wich is enabled by default, and the editor still displays the lens in the code wich should not do it for C# files. If I disable "Editor: Code Lens" the lens disappear on the code.

There is another issue equal to this for version 7 of .NET here:
#5809

Maybe the fix was not transported to the new .NET 8 version.

Steps to Reproduce

Disable:

  • Dotnet > Code Lens: Enable References Code Lens
  • Dotnet > Code Lens: Enable Tests Code Lens

Expected Behavior

No lens on the editor for C# files only.

Actual Behavior

Lens are still displayed.

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.86.0
C# Extension: 2.15.30
Using OmniSharp: true

Dotnet Information .NET SDK: Version: 8.0.101 Commit: 6eceda187b Workload version: 8.0.100-manifests.69afb982

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.101\

.NET workloads installed:
Workload version: 8.0.100-manifests.69afb982
[wasm-tools-net6]
Installation Source: VS 17.8.34408.163
Manifest Version: 8.0.1/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.workload.mono.toolchain.net6\8.0.1\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.1
Architecture: x64
Commit: bf5e279d92

.NET SDKs installed:
5.0.408 [C:\Program Files\dotnet\sdk]
8.0.101 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
angular-console nrwl 18.15.3 nrwl.angular-console-18.15.3
aws-toolkit-vscode amazonwebservices 2.8.0 amazonwebservices.aws-toolkit-vscode-2.8.0
csharp ms-dotnettools 2.15.30 ms-dotnettools.csharp-2.15.30-win32-x64
data-workspace-vscode ms-mssql 0.5.0 ms-mssql.data-workspace-vscode-0.5.0
EditorConfig EditorConfig 0.16.4 editorconfig.editorconfig-0.16.4
firacode SeyyedKhandon 2.2.1 seyyedkhandon.firacode-2.2.1
gitlens eamodio 14.7.0 eamodio.gitlens-14.7.0
material-theme-pack katthewaffle 1.0.2 katthewaffle.material-theme-pack-1.0.2
mib Veracosta 0.0.4 veracosta.mib-0.0.4
mssql ms-mssql 1.22.1 ms-mssql.mssql-1.22.1
mssql-scripts MEngRBatinov 0.4.0 mengrbatinov.mssql-scripts-0.4.0
nugetpackagemanagergui aliasadidev 2.0.6 aliasadidev.nugetpackagemanagergui-2.0.6
prettier-vscode esbenp 10.1.0 esbenp.prettier-vscode-10.1.0
sql-database-projects-vscode ms-mssql 1.4.1 ms-mssql.sql-database-projects-vscode-1.4.1
vsc-material-theme Equinusocio 34.3.1 equinusocio.vsc-material-theme-34.3.1
vsc-material-theme-icons equinusocio 3.4.0 equinusocio.vsc-material-theme-icons-3.4.0
vscode-docker ms-azuretools 1.28.0 ms-azuretools.vscode-docker-1.28.0
vscode-dotnet-runtime ms-dotnettools 2.0.1 ms-dotnettools.vscode-dotnet-runtime-2.0.1
vscode-eslint dbaeumer 2.4.4 dbaeumer.vscode-eslint-2.4.4
vscode-yaml redhat 1.14.0 redhat.vscode-yaml-1.14.0

Extension version: 2.15.30
VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:28:19.990Z)
OS version: Windows_NT x64 10.0.22631
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i5-1235U (12 x 2496)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.64GB (4.02GB free)
Process Argv --folder-uri file:///c%3A/Users/paulo.oliveira/Projetos/platform --crash-reporter-id d51401c5-1f6b-48fd-a54a-c0ce4ec4dfa0
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30951796
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019bcf:30953938
b5d27386:30958190
3ef8e399:30949928
e3gdj431:30958358
ccp2r6:30958158

@paulooliveira-muro
Copy link
Author

The problem was related with activating the setting: omnisharp.enableLspDriver

After I disable this setting everything seems to work as expected.

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

No branches or pull requests

1 participant