I'm trying to add background text for an extension I'm creating like how GitLens does. Is there an API, or function I can use to push text onto the editor?
I believe the related source code is here: https://github.com/gitkraken/vscode-gitlens/blob/main/src/annotations/lineAnnotationController.ts.
It uses the decorations feature of the VS Code API- in particular, text editor decorations. See the window.createTextEditorDecorationType
and editor.setDecorations
and related functions, and DecorationOptions
, and its properties like hoverMessage
and renderOptions
.