How to hide an individual CodeLens upon click?


Say if I have several codeLens like below and I want to hide them when I click. How do I do this? Seems the vscode.CodeLensProvider doesn’t support this?

enter image description here


I found a way to do it at

Basically add an event emitter to the provider.

Answered By – rara

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published