PowerShellEditorServices icon indicating copy to clipboard operation
PowerShellEditorServices copied to clipboard

Functions (and other logic) within Regions should be indented

Open PeterHodges15 opened this issue 2 years ago • 0 comments

Summary of the new feature / enhancement

Indentation should incoprorate Regions, if they exist. This logic is akin to why the contents of functions is indented. Note: I have searched and found no support for this, and Found no better place to request this enhancement. I am using Visual Studio Code with the MS PowerShell Plugin. Language specific Editor settings do not support doing this: https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings ___ is used instead of spaces because the View of the issue removed spaces Preferred:

================

Expanded:


Region Main ___Function Main { ______ValidateSettings Collapsed:


Region Main ___Function Main { ___} ___Function Function1 { ___} ___Function Function2 { ___} Current:

Expanded:

Region Main Function Main { _____ValidateSettings Collapsed:


Region Main

Function Main {

_____ValidateSettings } Function Function1 { } Function Function2 { }

Proposed technical implementation details (optional)

The Default Auto-Formatting should indent Functions when they exist within Regions. Not preferred, as this is user by user: provide language-specific-editor-settings to enable this

PeterHodges15 avatar Jun 05 '23 11:06 PeterHodges15