VS code definition "autoClosingPairs" is not recognized by the compiler
05:08 08 Feb 2026

I'm using VS Code to write math documents (with latex workshop extension), and I wanted to define auto-closing for the pair $-$, so that pressing $ once gives two copies of it with the cursor inside, and deleting the first should delete the second too. Gemini told me I should add this section to the settings.json file:

"[latex]": {
        "editor.autoClosingBrackets": "always",
        "editor.autoClosingPairs": [
            { "open": "{", "close": "}" },
            { "open": "[", "close": "]" },
            { "open": "(", "close": ")" },
            { "open": "$", "close": "$" }
        ]
    }

The problem is, when I do it I get the following:

This section was added to the settings.json file.

...with the message Unknown Configuration Setting. What's wrong?

visual-studio-code brackets dollar-sign auto-close