Development

Creating a Submenu in VS Code: A Step-by-Step Guide

January 24, 2023

While creating a session about Visual Studio Code extension development, I discovered that creating a submenu in the context menus is possible. These submenus are a great way to make the context menus less cluttered and easier to use. Submenu in a context menu When trying it out, I could not make it work easily as the docs were unclear.

Read more

Creating timer dismissable notifications in a Visual Studio Code extension

December 21, 2022

Notifications in Visual Studio Code are trivial for your extensions to notify the user when something happens or a process completes. A downside of these notifications is that they cannot be dismissed programmatically; they require manual user interaction. As in my current extension, I wanted to be able to have a notification that can do the following:

Read more

Simplify Visual Studio Code extension webview communication

October 6, 2022

In Visual Studio Code extension webviews you probably need to get familiar with post-messaging communication. This post-messaging communication is used when you want to start a process, request information, etc. For this communication flow to work, the extension and webview can send and listen to incoming messages. Although this is not a complicated flow to understand, it quickly feels like a disconnected communication flow, as you cannot simply wait for a response.

Read more

Creating a reusable auth provider in Visual Studio Code

September 12, 2022

A couple of months ago, I wrote about how you could create an authentication provider for Visual Studio Code. In this article, we will take it further and make it reusable by other extensions. The reason for creating a reusable authentication provider could differ per solution. Maybe you want to make one for other extensions to leverage, or your company wants to release multiple extensions that can all use the same type of authentication.

Read more

Adding editor actions for your extension webview in Visual Studio Code

September 2, 2022

In Visual Studio Code extension development, you may need a webview to give the developer/user the best experience for using your extension/functionalities. Webviews come in different flavors. You can open them in a panel or an editor view, but there is a difference between both when it comes to showing actions or enabling/disabling commands.

Read more