If you use multiple programming languages in your daily life, you probably need numerous extensions which target specific programming languages.
I use Go, Node.js, Python (sometimes), Rust and since one month, Deno. I need ESLint for Node, Go Extension for Golang, RLS for Rust and so on.
My laptop is 10 years old and it's getting slower every day so as my vscode profile. It is bloated with extensions. Think of getting minimum 3 extensions for every language you write! So what's the solution? If you don't like to hack stuff like I do, search for an extension that can help with this issue (look at the irony here). But if you're like me, the solution is VSCode Profiles!
Note: Some steps are taken from https://dev.to/jsjoeio/how-to-create-code-profiles-in-vscode-3ofo - Check out this amazing post too!
cd $HOME && mkdir code-profiles && cd code-profiles
You've probably know what the above line does but here's the explanation for those who don't: It navigates to your home directory (of your current terminal user) and creates a directory then it navigates into it.
It can be anything, I can't force you to work with a specific language or a tool 😄, but as an example I'll go with Deno.
mkdir deno cd deno mkdir data extensions
If you want to keep your current settings, open
settings.json in VSCode and copy your settings. Then while in the
deno directory we've just created:
cd data mkdir User nano settings.json
And paste the content of
Actually this step is optional too but I strongly recomment it or you'll have to write two paths and two flags each time you want to open your profile.
cd $HOME # I'll open my bashrc file because I'm using linux with bash but other shells are similar too nano .bashrc
And at the end of the file add this:
alias code-deno="code --user-data-dir ~/code-profiles/deno/data/ --extensions-dir ~/code-profiles/deno/extensions/"
Save and close it.
Then restart your terminal or source your bashrc file:
You now have a vscode profile for Deno with extensions specific to it! When you want to code with another PL just repeat the same steps for that language, and you'll have a fresh VSCode without bloated with extensions!