Skip to content

Add region/endregion snippets #22

Open
@thorbenw

Description

@thorbenw

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions