How to hide an individual CodeLens upon click?

Issue

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

Solution

I found a way to do it at https://github.com/dcastro/vscode-haskell-test-runner/commit/ee08bd1b4ec86474597b22ee6e07e71732b5426c

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