DEV Community

DoctorLai
DoctorLai

Posted on

Make Your Own VS Code Extension (Improve it Your Way)

Last week we talked about VS Code and its numerous extensions. Did you know there are more than 30k extensions in circulation?

But what to do when, in that sea of extensions, you are still one short? Make your own!

Harnessing the power of community

The best characteristic of VS Code is the ability to customise through extensions, making it more personalised and enhanced. Microsoft wholeheartedly accepts community contributions in the form of extensions, which are then made available to others after being published in VS Code Marketplace.

VS Code codebase is written in TypeScript, so being familiar with it could help, but knowing TypeScript is not a prerequisite. Some JavaScript knowledge should be enough to build your first extension.

Extensions that you can create can be of a different type, and some even don’t require knowledge of JavaScript. You can create snippets, colour themes, extension packs, language packs or others such as custom components and views, new programming language, etc.

The extension can be packaged into the installable VSIX format and distributed by yourself or shared with others through a VS Code Marketplace. Also, a good address for distributing or installing extensions is the Open VSX registry. Having it in a VSIX format, you can easily use it with other editors such as Codeanywhere or Sublime Text.

Why should you do it?

Firstly, never stop learning. Writing an extension using Typescript will motivate you to see how it works and how much its type safety and autocomplete features will help with your future JavaScript projects.

Secondly, it’s fun! It’s also quite satisfying to build something from scratch, especially something that you will use daily or something that will be helpful to others in the community. The extension does not have to be complex. Making a simple one is a great start as well.

Finally, it can be a source of additional income or just put you out there, opening new opportunities. Some of the popular extensions have millions of installs, and a number of those have viable business models in the form of subscriptions and upgrades.

Making your own VS Code extension could look like a moon landing at first, but of course, it is not. You should give it a try.

Reposted to Blog

Top comments (0)