I'm having difficulty with tab size in VSCode. For some YAML files I'm getting 2-space indentation while others are getting 4-space indentation. I'd like to always use 2-space indentation.
The below images show what the files look like when open in VSCode. Note that the vertical lines indicating indentation depth are different. This points to VSCode recognizing the indentation differently for the two files.
Some look like this:
Some look like this:
The yaml-specific settings in my user settings are:
"yaml.completion": false,
"yaml.format.enable": true,
"[yaml]": {
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.tabSize": 2
},
It appears to me that VSCode is actually recognizing the different indentation in the two files and is respecting that rather than respecting my tabSize: 2
setting. Does anyone know how to get 2 spaces to be used for all YAML files?