Describe the bug
When pressing return after writing a nested dict, the cursor will indent a single space, despite having set 2. This is happening in most indent modes, except "none" and "full".
Expected Behavior
The cursor should indent 2 spaces regardless of dictionary depth.
Current Behavior
The cursor is indented to tabSize -1. Setting tabSize to 4 will indent 3 spaces, to 8 will indent 7 spaces.
Steps to Reproduce
- Install vscode-yaml
- Configure yaml indenting:
"[yaml]": {
"editor.autoIndent": "advanced",
"editor.defaultFormatter": "redhat.vscode-yaml",
"editor.detectIndentation": false,
"editor.insertSpaces": true,
"editor.quickSuggestions": {
"comments": true,
"other": true,
"strings": true
},
"editor.tabSize": 2,
"editor.indentSize": "tabSize",
"editor.wrappingIndent": "none",
}
- Create a yaml file and type the following:
- Notice how
nesting: is indented 1 space instead of 2
FWIW this must be a relatively recent regression, no more than a few months.
Environment
Describe the bug
When pressing return after writing a nested dict, the cursor will indent a single space, despite having set 2. This is happening in most indent modes, except "none" and "full".
Expected Behavior
The cursor should indent 2 spaces regardless of dictionary depth.
Current Behavior
The cursor is indented to
tabSize -1. Setting tabSize to 4 will indent 3 spaces, to 8 will indent 7 spaces.Steps to Reproduce
nesting:is indented 1 space instead of 2FWIW this must be a relatively recent regression, no more than a few months.
Environment