vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Outline - Optionally treat and show `#` as H1, `##` as H2

Open o-l-a-v opened this issue 4 months ago • 1 comments

Prerequisites

  • [x] I have written a descriptive issue title.
  • [x] I have searched all issues to ensure it has not already been reported.

Summary

I've written so much markdown that I format my PowerShell scripts and comments by markdown headings.

# First section

## I do something

do-something

## Then I do something else

do-somethingelse

# Second section

do-somethingwithoutputfromfirstsection

It'd be very useful with the ability to show these comments as sections in the outline pane, treat them as markdown headings.

  • # as H1 / level 1
  • ## as H2 / level 2
  • ### as H3 / level 3

Etc.

I know I can use #region, but I don't like how it looks.

Proposed Design

Maybe a farfetched idea? Not something that should be enabled by default.

{
  "powershell.treatCommentsAsMarkdownHeadings": true
}

o-l-a-v avatar Aug 11 '25 07:08 o-l-a-v