When I click on a vscode decoration, I want to trigger a function. Here's the code I created for this:
const decoration = {
range,
hoverMessage: `${command} ${input}`,
command: {
title: 'Run Function',
command: 'run-function.playFunction',
arguments: [editor.document.fileName, funcNameMatches?.[1]]
}
};
decorations.push(decoration);
I found an example similar to this from gpt, but in the vscode library, the decoration doesn't have a command attribute and it's not working as expected. Any solutions or workarounds would be appreciated. I tried looking at what they did here https://github.com/jest-community/vscode-jest/tree/master but I couldn't figure it out.