Skip to content

[powershell] invalid auto-closing pairs in language-configuration.json #46988

Closed
@rkeithhill

Description

@rkeithhill

VSCode currently ships a language-configuration.json for PowerShell with the following autoClosingPairs:

	"autoClosingPairs": [
		["{", "}"],
		["[", "]"],
		["(", ")"],
		{ "open": "\"", "close": "\"", "notIn": ["string"]},
		{ "open": "'", "close": "'", "notIn": ["string", "comment"]},
		["/**", " */"],
		["<#", "#>"]
	],

This pair ["/**", " */"], is just flat out wrong for PowerShell. That is not any sort of valid language construct. Comments are either line-oriented, starting with # or block-oriented <# #>. Please remove ["/**", " */"], from the file.

The block oriented pair is also a problem. It is unusual for folks to use PowerShell's block comments on a single line since we have # for that. Second, VSCode should not auto-complete this inside a string or comment. Finally, when VSCode auto-completes <# it breaks the PowerShell extension's help completion feature - see PowerShell/vscode-powershell#1228.

I recommend that the <##> is removed as well.

cc @tylerl0706 @daviwil

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-autoclosingEditor automatic closing of parens / brackets / etc.languages-basicBasic language support issuesverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions