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

Add region/endregion snippets #22

Open
thorbenw opened this issue Mar 21, 2020 · 0 comments
Open

Add region/endregion snippets #22

thorbenw opened this issue Mar 21, 2020 · 0 comments

Comments

@thorbenw
Copy link

thorbenw commented Mar 21, 2020

I'm using the #region and #endregion feature/support in vscode frequently, and standard is complaining about what the default vscode JavaScript language service snippets insert (leaving no space or tab charcter between the // and the #).

vscode default when typing #r and selecting the #region proposal:
//#region
what is needed to satisfy standard:
// #region (with a trailing space character to enforce typing in some meaningful description)

vscode default when typing #e and selecting the #endregion proposal:
//#endregion
what is needed to satisfy standard:
// #endregion

I currently solve this by including a custom .code-snippets files in my projects with the following content:

{
	"Folding Region Start (JavaScript Standard Style)": {
		"scope": "javascript",
		"prefix": "#region",
		"body": [
			"// #region "
		]
	},
	"Folding Region End (JavaScript Standard Style)": {
		"scope": "javascript",
		"prefix": "#endregion",
		"body": [
			"// #endregion"
		]
	}
}

Best regards
Thorben

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

1 participant