In language-configuration.json, block comment start and end positions can be defined. For example, for cpp, or typescript-basics:
"blockComment":["/*","*/"]
typescript-basics also has an AutoClosingPair defined for block comments (requiring an additional asterisk, though I'm not aware of the origin of that convention) :
{
"open": "/**",
"close": " */",
"notIn": [
"string"
]
}
There are currently two settings, which make it possible to disable the auto-closing, for brackets and quotes: editor.autoClosingBrackets and editor.autoClosingQuotes.
It looks like editor.autoClosingBrackets also controls whether comments are auto-closed. Since there are fields in language-configuration.json to identify brackets and blockComments, it seems enabling/disabling of block comments could be done using a separate setting, rather than being lumped in with brackets.
There is not currently an autoClosingPair in cpp. I'd also like to suggest adding that, provided there is a way to disable it without disabling auto closing of brackets.
Alternatively, if there is a recommended way of implementing auto-closing of block comments that could be implemented by an extension, perhaps we could do that in the C/C++ extension and provide our own setting for it.
Ideally, C++ block comment closing would not require the second asterisks (required in typescript* and the closing */ could be typed over. (see: #54499 ).
#1966 is related.
In
language-configuration.json, block comment start and end positions can be defined. For example, for cpp, or typescript-basics:typescript-basics also has an AutoClosingPair defined for block comments (requiring an additional asterisk, though I'm not aware of the origin of that convention) :
There are currently two settings, which make it possible to disable the auto-closing, for brackets and quotes:
editor.autoClosingBracketsandeditor.autoClosingQuotes.It looks like
editor.autoClosingBracketsalso controls whether comments are auto-closed. Since there are fields inlanguage-configuration.jsonto identify brackets and blockComments, it seems enabling/disabling of block comments could be done using a separate setting, rather than being lumped in with brackets.There is not currently an
autoClosingPairincpp. I'd also like to suggest adding that, provided there is a way to disable it without disabling auto closing of brackets.Alternatively, if there is a recommended way of implementing auto-closing of block comments that could be implemented by an extension, perhaps we could do that in the C/C++ extension and provide our own setting for it.
Ideally, C++ block comment closing would not require the second asterisks (required in typescript* and the closing
*/could be typed over. (see: #54499 ).#1966 is related.