Need to insert text in a VS Code document using tabs
I’m writing a VS Code extension in TypeScript and need to insert indented text in a TextDocument using tabs or spaces as indicated by the TextEditorOptions. I can handle the resolution of tabs manually but I’m wondering if there is an idiomatic way using the VSCode API.
How to use Date() within the “vscode.commands.registerCommand” lambda body
I would like to provide a command to VS Code, so I follow the tutorial Your First Extention through to the end. For extra credit I am asked to “Contribute another command that displays current time in an information message.” My attempt fails. When I attempt to use the Date() function within the lambda body of my “helloworld.helloTime” command. When I run the command my Information message contains:
CancellationToken does not update when clicking “Cancell” Button in VSCode-Test-Extension
I’m trying to write a test Extension for VSCode. I added some TestItem
s to the testController
. These are correctly displayed at the test explorer.
I also have a runHandler
that starts executing. In the runHandler
i have a queue and a loop and i want to work over all tests in the queue. The while loop should stop executing, when i press the cancel button in the test explorer.
How to Display Local Images in Hover Provider in Visual Studio Code Extension?
I’m developing a Visual Studio Code extension and am facing issues displaying local images through a hover provider. The goal is to show an image when hovering over specific file paths in a .aws file recognized by my custom language ‘awscript’.