Description
tl;dr: When typing "${varname}"
in a bash script, the {
doesn't autoclose because of the following "
, but there's apparently a simple mechanism to change that, on a per-language bases.
If I'm understanding microsoft/vscode#52634 (comment) correctly (if not, I apologize, being fairly new to VSCode), language server providers can now define which characters are allowed to:
fall after the cursor as a prerequisite for [quote and bracket] autoclosing to occur.
Apparently, the default list of characters is ;:.,=}])> \n\t
.
I humbly propose that, for bash-language-server, double-quotes be added to that list, as a common idiom is to put double-quotes around variable references (e.g. "${varname}"
).
In TextMate, it is lovely being able to type "
(which autocloses), followed by $
, followed by {
(which also autocloses), and then varname
.
In VSCode, the {
doesn't autoclose because of the following "
; which is why I propose adding it to the default ;:.,=}])> \n\t
list for bash-language-server.
I acknowledge there may be a downside I'm not considering :)