Quick Tip: VS Code Extension Folder Location

VS Code is awesome and there are so many great extensions that make life easier. Some of these extensions store data in folders which are usually placed at the root of the workspace like:

└───.history # Local History extension folder

Until recently, I was adding those folders to my .gitignore file since they are mainly for personal/local use and didn't want to mess with my teammates' setups. This isn't cumbersome but felt a little weird, like mixing too much of my personal setup into our project.

All of our projects already have .vscode in the .gitignore file so it makes sense to move any extension folders into the .vscode folder and bypass adding individual folders to .gitignore.

│ └───.history

Most extensions that have settings/data folders also have a way to link to the path. The example above is for the Local History extension which has a setting called Local History: Path. Just drop a ${workspaceFolder}/.vscode in there and you're good to go.

Not a huge win but it's nice that you don't have to add something to your .gitignore file every time you try out a new extension.

Discuss this article on Twitter




gitproductivityvs codequick tip
Working on a New Feature as a Senior Frontend Developer

© 2012-2022, built with Next.js and Chakra UI

Instagramtwittergithubjoelmturner's DEV Profilejoelmturner's Mastodon Profile