Skip to content

Make option for auto-closing pairs #57838

@Serhioromano

Description

@Serhioromano

I an an author of VS Code extension for Structured Text language support. I have a lot of auto closing pairs

https://github.com/Serhioromano/vscode-st/blob/master/language-configuration.json

The problem I meet that not every user like it. But some do like. I also have number of snippets that cover the same scope. It is personal preference. Some like to type with autoclose, some like snippets. And those who like snippets ask me to get rid of autoclose.

Would it be possible to add a parameter to enable it or disable? For instance.

"autoClosingPairs": [
	{"open": "{", "close": "}"},
	{"open": "[", "close": "]"},
	{"open": "VAR_INPUT", "close": "END_VAR", "notIn": ["string"], "option" : "st.autoclose.vars"},
	{"open": "PROGRAM", "close": "END_PROGRAM", "notIn": ["string"], "option" : "st.autoclose.keys"},

This new "option" : "st.autoclose.vars" tells that VSC should autoclose only if st.autoclose.vars parameter is set to TRUE. And I define this parameter in package.json in contributes.configuration

To me it looks simple and effective. What do you think?

Metadata

Metadata

Assignees

Labels

*duplicateIssue identified as a duplicate of another issue(s)editor-autoclosingEditor automatic closing of parens / brackets / etc.feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions