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

Formatter ignores pipelineIndentationStyle #5044

Open
4 of 6 tasks
github-account1111 opened this issue Sep 16, 2024 · 1 comment
Open
4 of 6 tasks

Formatter ignores pipelineIndentationStyle #5044

github-account1111 opened this issue Sep 16, 2024 · 1 comment
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!

Comments

@github-account1111
Copy link

Prerequisites

  • I have written a descriptive issue title.
  • I have searched all open and closed issues to ensure it has not already been reported.
  • I have read the troubleshooting guide.
  • I am sure this issue is with the extension itself and does not reproduce in a standalone PowerShell instance.
  • I have verified that I am using the latest version of Visual Studio Code and the PowerShell extension.
  • If this is a security issue, I have read the security issue reporting guidance.

Summary

The setting in question says:

IncreaseIndentationAfterEveryPipeline: Indent more after the first pipeline and keep this indentation. Example:

foo |
    bar |
        baz

That does not happen.
Instead, I get

foo |
bar |
baz

PowerShell Version

PSVersionTable : The term 'PSVersionTable' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ PSVersionTable; $Host
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (PSVersionTable:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException



Name             : ConsoleHost
Version          : 5.1.22621.4111
InstanceId       : 6fce9dd9-a19f-404e-9d8b-b724ba96b14c
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

Visual Studio Code Version

1.92.2
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
x64

Extension Version

Steps to Reproduce

Add "powershell.codeFormatting.pipelineIndentationStyle": "IncreaseIndentationAfterEveryPipeline", to settings.json.

Visuals

PowerShell.formatter.pipelineIndentationStyle.mp4

Logs

No response

@github-account1111 github-account1111 added Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed! labels Sep 16, 2024
@andyleejordan
Copy link
Member

Have you tried PowerShell 7 instead of 5.1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug A bug to squash. Needs: Triage Maintainer attention needed!
Projects
None yet
Development

No branches or pull requests

2 participants