Every VS Code extension a JavaScript web developer should have in 2021 (with gifs!)

Visual Studio Code is a powerful editor out of the box, but there are many many VS Code extensions to make it even more powerful!

If you're new to VS Code or coding in general, I recommend reading through everything here to see if there are new ways you can optimize your workflow. If you're a VS Code veteran, see if there's anything here you don't have, and let me know in the comments if I missed anything!


VS Code is constantly updating, and I regularly review my extensions to figure out which ones are and are not adding value. I'll be keeping this list updated as I add and remove extensions.


Must-have extensions (alphabetical)

Better Comments

Better Comments demo gif

Better Comments shows your comments as different colors depending on how they're prefixed. Great to quickly visually scan and identify important pieces of your code. Keep in mind these colors only show if you have the extension, so this is best for personal use cases.

Bookmarks

Bookmarks

Have you ever been working on a feature that involves 10 functions across several files, forcing you to hop around and re-find each function? Bookmarks helps you keep track of all the code that's important to you. Just add a bookmark to easily find your spot later!

Bracket Pair Colorizer

Bracket Pair Colorizer demo gif

Trying to find missing parenthesis is my least favorite programming activity. Luckily, Bracket Pair Colorizer makes this a lot easier by color-coding all corresponding parenthesis and brackets. (NOTE: This one has some known performance issues, and theres a beta version of Bracket Pair Colorizer 2 out to fix this. Thanks for the tip, [@garretalex](https://twitter.com/gerrit_alex/status/1226772068806594560))_

change-case

change-case demo gif

change-case gives an easy way to change a word or variable name to all sorts of cases including camelCase, snake_case, TitleCase, and more!

Code Spell Checker

Code Spell Checker demo gif

Code Spell Checker finds typos and misspelled words, even if they're in the middle of a variable name. This is one I didn't truly realize the value of until I had it installed and started finding all my little typos. Turns out, having a spell checker in a code editor is just as useful as having one in a word processor!

ES7 React/Redux/GraphQL/React-Native snippets

Snippets demo gif

ES7 Snippets has so many useful tools for autofilling in boilerplate text. Saves a ton of time whenever I'm writing imports or React components.

ESLint

ESLint demo gif

ESLint is a great linter that will pick out syntax errors for you in your code to catch issues before you even run your code. Requires configuration of ESLint in your project.

GitLens

GitLens demo gif

GitLens is a feature-packed extension that gives you all sorts of insight into your repository's commit history. Personally, I use it most often to see who wrote code inline, see previous versions of files, and compare HEAD to other commits/branches.

glean

glean demo gif

If you're a React developer, you probably often find yourself breaking out large components into smaller ones in separate files as well as switching between class and functional components. glean automates all this for you and automatically inserts all the needed boilerplate.

Import Cost

Import Cost demo gif

Import Cost helps you to be cognizant of the size of your imports. It shows the size of each import inline, and shows in red and yellow warning colors if the import is larger than normal.

indent-rainbow

indent-rainbow demo gif

indent-rainbow makes it effortless to see indents at a glance. Plus, it's super pretty, right?

javascript console utils

javascript console utils demo gif

Find yourself console.log()-ing a lot? javascript console utils automates this for you by inserting console.log() statements into your code, complete with the plaintext variable name and variable value. There's even a hotkey to remove all console.log() statements when you're done with them!

Prettier

Prettier demo gif

This one's important. I'd even go as far as to say that nobody should code without Prettier. Prettier auto-formats your code with alt + shift + F, or you can have it auto-format on every save. This saves a TON of time over remembering every semicolon and indent.

Relative Path

Relative Path demo gif

Ever work in a large codebase trying to figure out how to reference another file? Exactly how many ../'s do you need to get back to the proper directory, then what's the path back down? Relative Path lets you search all files and auto-inserts the path relative to the file you're in. No tree counting needed!

Settings Sync

*There's not a great way to demo this one, so here's my favorite gif of all time instead:*

Cat and Shaq wiggling

So, about the extension: When you've got a sweet setup in your editor, Settings Sync gives a painless way to sync all your VS Code settings and extensions across your workstations by saving your configuration to a GitHub gist. They've even made several improvements over the past year to make syncing/authentication much easier.

Toggle Quotes

Toggle Quotes demo gif

With Toggle Quotes, just use + ' (or ctrl + ') to cycle your strings between using `, ', and "

Version Lens

Version Lens demo gif

It can be a hassle to keep track of all the latest versions of your npm packages. Version Lens shows you inline how your installed versions in package.json compare to the current versions.

Bonus

These items don't dramatically improve my day-to-day productivity, but golly, I sure do like them:

  • Dracula Offical – my preferred color theme
  • file-icons – gives unique file icons to quickly identify types in the file browser. I find it most useful for quickly distinguishing between .ts, .js, .test.ts, & .test.js. Screenshot of file browser with icons
  • Fira Code – a spiffy-looking font that includes some sweet ligatures! This means that inequality symbols such as <= and !== show up as a single character. It hasn't improved my coding, per se, but it has made me feel cooler. Screenshot of ligatures ℹ️ Other ligatured fonts recommended by readers: JetBrains Mono, Cascadia Code, Recursive Sans & Mono

    NOTE: Ligatures can be a controversial topic among coders. My argument for using them is that I think they're sexy. I rest my case.

  • Vim – When I first started coding, I got really into becoming a Vim editor power user. The functionality of VS Code goes far beyond the utility I get from Vim, but sometimes I miss those old "Change 100 lines with 5 cryptic keystrokes" features. I mostly leave this disabled, but I fire it up every once in a while when I'm feeling spunky.

Extensions I no longer use

Sometimes I stop using an extension because the functionality is added to base VS Code, or maybe the extension isn't as useful as I once thought it was. Here are some extensions I used heavily once, but eventually uninstalled:

Anything else?

What did I miss? Is there any other extension that helps you be a productive coder? Please let me know in the comments!


Continue the conversation

Did this help you? Do you have other thoughts? Let's continue the discussion on Twitter! If you'd like to show your support, feel free to buy me a coffee. Thanks for reading!


Zak Laughton

Written by Zak Laughton, a full stack developer building tools to make life a little easier. Huge fan of JavaScript, React, GraphQL, and testing code.