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

Colorization Broken - Cannot disable Code Lens References #111036

Closed
dfdumaresq opened this issue Nov 20, 2020 · 12 comments
Closed

Colorization Broken - Cannot disable Code Lens References #111036

dfdumaresq opened this issue Nov 20, 2020 · 12 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@dfdumaresq
Copy link

Issue Type: Bug

When the Code Lens References annotation shows 0 references, it causes the colorization of my code to appear grey. Very ugly.
Not having found a way to prevent this, other than turning off Code Lens in the Editor, which I don't wish to do, I am attempting to disable References settings.

"java.referencesCodeLens.enabled": false

However, it remains Enabled.

  1. Go to Settings and search for References
  2. Choose Java and uncheck Enable/Disable the references code lens.
  3. Notice It remains Enabled.

Here you see java colorization is normal.
image

After scrolling up where the 0 references annotation appears, the colorization turns ugly.
image

Notice in the settings screen on the right that References is Enabled, even though the checkbox is off.


VS Code version: Code 1.51.1 (e5a624b, 2020-11-11T01:11:34.018Z)
OS version: Darwin x64 19.6.0

System Info
Item Value
CPUs Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
webgl: enabled
webgl2: enabled
Load (avg) 1, 2, 2
Memory (System) 16.00GB (2.24GB free)
Process Argv --crash-reporter-id 161e5da9-f592-4143-baa2-0a9d01a1bfab
Screen Reader no
VM 0%
Extensions (64)
Extension Author (truncated) Version
html-snippets abu 0.2.1
atlascode atl 2.8.5
npm-intellisense chr 1.3.1
path-intellisense chr 2.3.0
bracket-pair-colorizer Coe 1.0.61
quick-html-previewer dai 1.0.1
vscode-dotnet-auto-attach Den 1.1.1
githistory don 0.6.14
gitlens eam 11.0.2
vscode-html-css ecm 0.2.3
tslint eg2 1.0.44
LogFileHighlighter emi 2.10.0
vscode-nupkg eri 1.0.1
prettier-vscode esb 5.8.0
vscode-firefox-debug fir 2.9.1
text-transform flo 0.1.0
auto-close-tag for 0.5.9
go gol 0.18.1
gc-excelviewer Gra 3.0.40
gitflow4code Gre 1.2.3
live-html-previewer hdg 0.3.0
beautify Hoo 1.5.0
vscode-nuget-package-manager jmr 1.1.6
svg joc 1.4.1
intellij-idea-keybindings k-- 0.2.41
dotnet-core-essentials Kis 0.0.8
typelens kis 1.9.6
csharpfixformat Leo 0.0.84
git-graph mhu 1.27.0
vscode-docker ms- 1.8.0
csharp ms- 1.23.6
mssql ms- 1.9.0
remote-containers ms- 0.148.1
remote-ssh ms- 0.56.0
remote-ssh-edit ms- 0.56.0
remote-wsl ms- 0.51.4
vscode-remote-extensionpack ms- 0.20.0
cpptools ms- 1.1.2
js-debug-nightly ms- 2020.11.1117
sublime-keybindings ms- 4.0.7
vscode-typescript-next ms- 4.2.20201119
vscode-typescript-tslint-plugin ms- 1.2.3
debugger-for-chrome msj 4.12.11
vetur oct 0.30.2
vscode-jest Ort 3.2.0
vsnotes pat 0.7.1
material-icon-theme PKi 4.4.0
typescript-hero rbb 3.0.0
toggle reb 0.0.1
java red 0.71.0
vscode-yaml red 0.13.0
vs-code-prettier-eslint rve 0.3.2
preview-vscode sea 2.2.5
vscode-hexdump sle 1.8.1
msbuild-project-tools tin 0.3.10
vscode-workspace-explorer tom 1.5.0
vscodeintellicode Vis 1.2.10
vscode-java-debug vsc 0.29.0
vscode-java-dependency vsc 0.15.0
vscode-java-pack vsc 0.10.0
vscode-java-test vsc 0.26.0
vscode-maven vsc 0.25.0
gitblame wad 6.0.0
material-theme zhu 3.9.6
@dfdumaresq dfdumaresq changed the title Cannot disable References Code Lens Colorization Broken - Cannot disable References Code Lens Nov 20, 2020
@dfdumaresq
Copy link
Author

The actual problem is that the colorization seems broken when there are zero references to the code item, so I have changed the title.

@dfdumaresq
Copy link
Author

Here are the java specific settings from settings.json
"java.configuration.updateBuildConfiguration": "automatic",
"java.configuration.checkProjectSettingsExclusions": false,
"gitlens.codeLens.recentChange.enabled": false,
"java.implementationsCodeLens.enabled": false,
"java.referencesCodeLens.enabled": false,
"[java]": {
"editor.suggest.snippetsPreventQuickSuggestions": false
},
}

@roblourens roblourens assigned aeschli and unassigned aeschli Nov 21, 2020
@roblourens
Copy link
Member

Please file this issue in the repo for the Java extension

@dfdumaresq
Copy link
Author

dfdumaresq commented Nov 21, 2020 via email

@roblourens
Copy link
Member

Sure, it would be easier for me to follow with a TS example. I wouldn't think that codelens affects colorization

@roblourens roblourens reopened this Nov 22, 2020
@roblourens roblourens added the info-needed Issue requires more information from poster label Nov 22, 2020
@dfdumaresq
Copy link
Author

dfdumaresq commented Nov 23, 2020

Here's an example with a TS file, in which I invalidated the exported interface (IInstitutionDetails) by adding a 1 causing it to have zero references. It previously had 27 and each of its properties have been greyed out.

image

Turn on/off with Code Lens in Settings
image

Code Lens Off
image

It gets worse when you check
"typescript.referencesCodeLens.showOnAllFunctions": true
image

@aeschli aeschli assigned alexdima and unassigned aeschli Nov 23, 2020
@alexdima
Copy link
Member

This is the graying out caused by "unused symbols". I don't know why the graying out is so strong in this case, but it could be caused by some specific theme or by some color customization.

@alexdima alexdima assigned mjbvz and unassigned alexdima Nov 23, 2020
@dfdumaresq
Copy link
Author

dfdumaresq commented Nov 24, 2020

At this point, I would just like to disable References in Code Lens.
From Settings, search term "code lens references"
image
For any language, the References Code Lens state always says Enabled
With TypesScript for example, if I check the checkbox on or off and copy the setting as JSON, I see the correct JSON.

Off:
"typescript.referencesCodeLens.enabled": false
On:
"typescript.referencesCodeLens.enabled": true
Off:
"typescript.referencesCodeLens.enabled": false

But the Code Lens 'References' annotation in the code is always is shown. So the Enabled state in the Settings cannot be trusted.
image

Unless I uncheck this one: Editor: Code Lens (Controls whether the editor shows CodeLens)
image

image

@dfdumaresq dfdumaresq changed the title Colorization Broken - Cannot disable References Code Lens Colorization Broken - Cannot disable Code Lens References Nov 24, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Nov 24, 2020

@alexdima Unused code makes the text more transparent. We have't greyed out code for a long time (only was in one or two releases when the unused feature first rolled out)

@dfdumaresq I can't reproduce the reference code lens settings not working. Does this reproduce in the latest VS Code insiders build with all extensions disabled?

@dfdumaresq
Copy link
Author

dfdumaresq commented Nov 24, 2020

@mjbvz - it does work correctly with the latest VC Code insiders build and all extensions disabled.

Here you can see I've renamed the IInstitution interface by adding 1 and 0 references shows up as grey while the actual code remains colourized.
image

@dfdumaresq
Copy link
Author

Ok - I have found the culprit. After disabling TypeLens (kisstkondoros.typelens) I have a clean colourized file with 0 references.
image

@alexdima
Copy link
Member

@dfdumaresq Please report the issue also to kisstkondoros.typelens.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants