'How do I set folder and language specific indent settings in VSCode?

I'm working on a specific project (blender), and I have run into a particular dilemma with their indentation guidelines.

I personally prefer tabs with size 4 for indenting my C/C++ code, but this project specifies 2 spaces for indentation. I also use Python with this project, which according to standard uses 4 space for indentation.

How do I configure VSCode so that, Python has 4-space indents, C/C++ has tab indents with size 4, and C/C++ only inside the specific repo folder uses 2-space indents?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source