Hi I am developing an extension for VSCode. I am decorating the text editor and hovering some items. Is it possible to make clickable items at hoverMessage
and modify the range according to it.
The extension is at: https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates
You can see the hoverMessage
from the GIF
Tip: You can jump to the definition with Ctrl+Click or open the definition to the side with Ctrl+Alt+Click.
Once installed and after reloading vscode , you will be presented with a message to Activate the icons. In case this doesn't happen, navigate to: Linux & Windows => File > Preferences > File Icon Theme > VSCode Icons. MacOS => Code > Preferences > File Icon Theme > VSCode Icons.
Yes, using markdown you can then create a command link that will execute a command when a user clicks on it:
import * as vscode from 'vscode';
const myContent = new vscode.MarkdownString('[link](command:myCommand?arg1)');
// Command Uris are disabled by default for security reasons.
// If you set this flag, make sure your content is not constructed
// using untrusted/unsanitized text.
myContent.isTrusted = true;
const myHover = new Hover(myContent);
This command can perform whatever action you want
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