vscode-code-outline
vscode-code-outline copied to clipboard
Ability to add titles via comments
Taking from Xcode (not sure if it exists elsewhere) it would be great to be able to parse comments into titles in the outline. The outline is a HUGE help but some long files can still be difficult to browse quickly.
Something like:
MARK: Actions
function doThing {}
function doOtherThing {}
MARK: Helpers
function helpThings {}
function helpMore {}
Would resolve to:
‣ Actions ▪︎ doThing ▪︎ doOtherThing
‣ Helpers ▪︎ helpThings ▪︎ helpMore
Thank you for the suggestion.
I'm not currently planning to do any custom parsing of all possible syntaxes. VSCode has preliminary support for regions for folding and I'll see if those can be accessed programmatically.
Region would be a good tag as well. Anything that could make sense to break up the outline.
I was going to suggest support for Regions! I have been using them to group functions in my Powershell scripts so it would be great to have them show in the outline just like functions including sub functions. Thank you for your great work !
Regions aren't supported in all languages though right?
They aren't but this plugin does not do any language-specific processing and relies on language plugins to provide symbol locations. This means implementing comment marks is roughly the same amount of work as adding region support to your language of choice.
Thank you for looking into it. Have a good weekend.