Skip to content
This repository has been archived by the owner on Jul 11, 2018. It is now read-only.

Ability to add titles via comments #50

Open
WCByrne opened this issue Oct 13, 2017 · 6 comments
Open

Ability to add titles via comments #50

WCByrne opened this issue Oct 13, 2017 · 6 comments

Comments

@WCByrne
Copy link

WCByrne commented Oct 13, 2017

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

@patrys
Copy link
Owner

patrys commented Oct 13, 2017

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.

@WCByrne
Copy link
Author

WCByrne commented Oct 16, 2017

Region would be a good tag as well. Anything that could make sense to break up the outline.

@jonathanv81
Copy link

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 !

@WCByrne
Copy link
Author

WCByrne commented Oct 24, 2017

Regions aren't supported in all languages though right?

@patrys
Copy link
Owner

patrys commented Oct 24, 2017

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.

@jonathanv81
Copy link

Thank you for looking into it. Have a good weekend.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants