Skip to content

[2020.5.0] Wrong indentation #1508

Closed
Closed

Description

@ili101

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%

Activity

  1. SydneyhSmith commented on May 21, 2020

    @SydneyhSmith
    Collaborator

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

  2. bergmeister commented on May 21, 2020

    @bergmeister
    Collaborator

    Yes, thank. We have PR #1497 for a fix already ready, can you review please Rob Holt (@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions