Indentation switches from 2 to 4 spaces if a step uses `env:` or `with:`
Describe the bug
If a job contains a step which uses env: or with: then the indentation on subsequent lines switches from 2 spaces to 4 spaces. The issue seems to only persist for the rest of the given job and resets in the next one.
To Reproduce
-
Start out with this file
on: push jobs: test: runs-on: ubuntu-latest steps: - name: Step 1 run: echo "step 1" #- name: Step 2 - name: Step 3 uses: actions/checkout@v2 with: foo: bar #- name: Step 4 - name: Step 5 uses: echo "step 5" env: foo: bar #- name: Step 6 - name: Step 7 run: echo "step 7" -
Uncomment step 2, go to the end of the line, press enter then tab, start to type
run: -
The resulting text should be aligned with
namefrom the line above it -
Uncomment step 4, go to the end of the line, press enter then tab, start to type
run: -
The resulting text will not be aligned with
namefrom the line above it, instead it will be indented an extra 2 characters -
Uncomment step 6, go to the end of the line, press enter then tab, start to type
run: -
The resulting text will not be aligned with
namefrom the line above it, instead it will be indented an extra 2 characters
Expected behavior
The second line of step's 4 and 6 to be aligned with the line above it.
Screenshots
https://github.com/github/vscode-github-actions/assets/831974/7c202f2d-a1f3-4097-9735-5cc474eb625c
Extension Version
v0.25.8
Additional context
-
The issue goes away if you switch the file's language from
github-actions-workflowtoyaml -
Adding the following to my vscode settings file doesn't help:
"[github-actions-workflow]": { "editor.tabSize": 2, "editor.insertSpaces": true, }, -
The issue happens with and without GitHub Copilot running
Please fix this