Extensions

Using Vite for bundling your Visual Studio Code extension

October 18, 2023

important The CJS build of Vite’s Node API is no longer supported and will be removed in version 6. As Visual Studio Code extensions do not support ESM, my recommendation is use an alternative bundler such as webpack, tsup, or esbuild instead of Vite. A couple of weeks ago, I started looking into the possibility of retrieving the Content Collections from Astro and generating content-types for Front Matter CMS.

Read more

Things to know when using custom icons for Visual Studio Code commands

October 6, 2023

You can specify an icon when adding commands to your Visual Studio Code extension. These icons are rendered when you register the commands, such as the explorer title bar, document title bar, and more. info More info on registering command can be found in the VSCode documentation. You have three options for specifying the icon:

Read more

Organize and Optimize: Splitting Visual Studio Code Extension Settings into Multiple Categories

July 22, 2023

I have always been adding my Visual Studio Code extension settings to the contributes.configuration object, but I was missing a way to organize the settings in multiple sections/groups. That way, the end user gets a better overview of all settings grouped by their category. When reading the VSCode contributes.configuration schema documentation, I spotted the following: “This section can either be a single object, representing a single category of settings, or an array of objects, representing multiple categories of settings.

Read more

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