How to change formatting settings?

Hey there, been loving the website and games.
I’m mainly using C, and the integrated vscode editor is great to use but the default style for C formats indents to 2 spaces, which is slightly unbearable.
Is there any way to change it to 4 spaces?
I tried setting the tab width to 4 in the config, but that doesn’t affect the formatter, and i haven’t been clever enough to find any other settings to adjust it.

thanks a bunch!

Do you have a screenshot which shows that? I think the default is 4 spaces for C (2 spaces for e.g. Dart and Ruby).

Not really sure what you’ve tried, but this works for me:

"editor.indentSize": 4

I’ve tried indentSize as well, with no luck.
the ide inserts 4 space indents whenever I’m writing code, but when I try to format it, the code gets formatted down to 2 space indents.
example:
before formatting
chrome_65Y2OFw4KG

after formatting
NjeLPKOT7Q

That’s weird. What settings do you have? Could you please copy and paste every line here?

Sure, here you go. it’s all pretty default stuff.

{
“editor.acceptSuggestionOnEnter”: “on”,
“editor.autoClosingBrackets”: “languageDefined”,
“editor.autoClosingQuotes”: “languageDefined”,
“editor.bracketPairColorization.enabled”: false,
“editor.fontSize”: 12,
“editor.minimap.enabled”: false,
“editor.mouseWheelZoom”: true,
“editor.tabSize”: 4,
“editor.indentSize”: 4

}

I’m wondering whether there are some issues with the browser’s cookies, cache, or things like that, or there may be some addons or extensions which interfere somehow? If you try the same thing in another browser, or a Private Window (in Firefox) or in Incognito Window (in Chrome), will that work?

tried a different browser, same behavior

What do you mean by “try to format it”? What did you do?

I mean right click in ide > format document or format selection

I see. Sorry, I’ve never used that function before.

Does this help you?