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

Support for #region folding #284

Closed
neitik opened this issue Jun 7, 2018 · 3 comments
Closed

Support for #region folding #284

neitik opened this issue Jun 7, 2018 · 3 comments
Milestone

Comments

@neitik
Copy link
Contributor

neitik commented Jun 7, 2018

Hello, I would really like to see support for #region folding for Puppet manifests, as described here:
microsoft/vscode-python#33

This is supported out-of-box by VSCode and only a minor change is required to make it work it with Puppet manifests:

"folding": {
	"offSide": true,
	"markers": {
		"start": "^\\s*#region\\b",
		"end": "^\\s*#endregion\\b"
	}
}

The code is taken from aforementioned issue and tested locally.

@glennsarti
Copy link
Contributor

There is also an option to add syntax aware folding (as opposed to the default indentation and maker style)

https://code.visualstudio.com/docs/editor/codebasics#_folding
https://code.visualstudio.com/docs/extensionAPI/vscode-api#FoldingRangeProvider

This would require upping the minimum VSCode version to 1.22

Although I'm yet to find a compelling reason to go down this route. Something to think about.

jpogran pushed a commit that referenced this issue Jun 12, 2018
(GH-284) Added support for #region folding
@glennsarti
Copy link
Contributor

Fixed and will be available next release!

@glennsarti glennsarti added this to the 0.11.0 milestone Jun 12, 2018
@neitik
Copy link
Contributor Author

neitik commented Jun 12, 2018

Great, thank you 👍

I think we can close this.

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

No branches or pull requests

2 participants