Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2020.5.0] Wrong indentation #1508

Closed
ili101 opened this issue May 21, 2020 · 2 comments
Closed

[2020.5.0] Wrong indentation #1508

ili101 opened this issue May 21, 2020 · 2 comments

Comments

@ili101
Copy link

ili101 commented May 21, 2020

Issue Type: Bug

if ($true) {
'A'
{'A'}
}

Alt + Shift + F
On 2020.4.0 works as expected:

if ($true) {
    'A'
    { 'A' }
}

On 2020.5.0 no indentation on 'A', 1 space before { 'A' } instead of 4 spaces:

if ($true) {
'A'
 { 'A' }
}

Edit: found the problem/solution for now, changing "powershell.codeFormatting.pipelineIndentationStyle" from the default "None" to anything else ("NoIndentation", "IncreaseIndentationAfterEveryPipeline", "IncreaseIndentationForFirstPipeline") and indentation works again as expected.
Looks like the new "None" setting that was added in the last update is broken.

Extension version: 2020.5.0
VS Code version: Code 1.45.1 (5763d909d5f12fe19f215cbfdd29a91c0fa9208a, 2020-05-14T08:27:35.169Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs AMD Ryzen 7 1800X Eight-Core Processor (16 x 3593)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.95GB (7.99GB free)
Process Argv
Screen Reader no
VM 22%
@SydneyhSmith SydneyhSmith transferred this issue from PowerShell/vscode-powershell May 21, 2020
@ghost ghost added the Needs: Triage 🔍 label May 21, 2020
@SydneyhSmith
Copy link
Collaborator

Thanks @ili101 looks like a dupe of #1496 should be fixed in the next VSCode PowerShell release

@bergmeister
Copy link
Collaborator

bergmeister commented May 21, 2020

Yes, thank. We have PR #1497 for a fix already ready, can you review please @rjmholt
The short term fix for end users is to change the default back to NoIndentation in the next update to the preview extension, which has already been merged and is just pending a re-release: PowerShell/vscode-powershell#2698
Until PSSA 1.19.1 (or 2.0) releases, we suggest to hold off using the new None setting. Many thanks for the feedback :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants