Is it possible to register a click event on decorations?
I am rendering an icon on the gutter like this. Is there a way to get click event on what is being rendered on the gutter?
const decoration = vscode.window.createTextEditorDecorationType({
gutterIconPath: vscode.Uri.file('path/to/icon.svg'),
});
const editor = vscode.window.activeTextEditor;
editor.setDecorations(decoration, [new vscode.Range(
new vscode.Position(1, 0),
new vscode.Position(1, 0)
)]);
VSCode has the capability but does not offer a API for click events on gutter decorations currently. If you would like such an API vote up https://github.com/microsoft/vscode/issues/5455
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With