vscode
vscode copied to clipboard
Disable code lens for output channels
Extensions that register a code lens provider for all documents/editors can trigger an endless loop which goes like this
- editor makes request for code lens
- logging for that request occurs
- output channel scrolls to reveal last log
- another code lens request is issued
- 🔁
fyi @ulugbekna
Just fyi, some extensions make extensive use of output channels, so I wonder if codelense was ever used for them, e.g. https://wallabyjs.com/
so I wonder if codelense was ever used for them, e.g. https://wallabyjs.com/
🤞 not but lets check with @ArtemGovorov
@bpasero @jrieken Thanks for bringing this up. We are indeed using code lens in output channels, very extensively in Quokka
Code lens are a great fit for our use case as they help with discoverability of features as well as provide a nice compact way to display context actions for rich output.
We do register and use our own language (quokka-output) for the output, is it perhaps possible to allow configuring code lens availability in output channels per language (with false as a default)?
@ArtemGovorov thanks for the swift reply. I am reverting my change and I'll push something like https://github.com/microsoft/vscode/commit/a6965fbd4d0bcdf4b14111ce529eef9fbb13501a for code lens. That means our default logger will ignore code lense requests for output-documents. That should do it
@ulugbekna You might need some extra work, e.g no logging, no logging for output-scheme, only register for known languages etc pp.
@jrieken Awesome, thanks a lot!