写入或尝试更改 VS Code 设置时出错

Bra*_*rad 2 json visual-studio-code

当我尝试更改我的设置时出现此错误 无法写入用户设置。请打开用户设置以更正其中的错误/警告,然后重试。 也许我盯着这个太久了,但我没有看到我有错误的地方。如果我手动将设置复制到文件中,例如底部的"workbench.sideBar.location": "right",它工作正常。谁能在这里看到我的 json 错误?版本 1.30.0。这是在更新到最新版本之前发生的

{
"files.autoSave": "onFocusChange",
"editor.fontSize": 18,
"editor.tabSize": 2,
"editor.wordWrap": "on",
"beautify.tabSize": 2,
"emmet.triggerExpansionOnTab": true,
"bracketPairColorizer.colorMode": "Independent",
"workbench.iconTheme": "material-icon-theme",
"workbench.tips.enabled": false,
"editor.parameterHints": false,
"highlight-matching-tag.leftStyle": {
"borderWidth": "0 0 0 3px",
"borderStyle": "dotted",
"borderColor": "yellow",
"borderRadius": "5px"
},
"highlight-matching-tag.rightStyle": {
"borderWidth": "0 3px 0 0",
"borderStyle": "dotted",
"borderColor": "yellowd",
"borderRadius": "5px"
},
"bracketPairColorizer.independentPairColors": [
["()", ["Aqua", "Orchid", "LightSkyBlue"], "Red"],
["[]", ["LightSkyBlue", "Orchid", "yellow"], "Red"],
["{}", ["LightSkyBlue", "Orchid", "Aqua"], "Red"]
],
"bracketPairColorizer.consecutivePairColors": [
["</", ">"],
["<", "/>"],
"<>",
["Gold", "Orchid", "LightSkyBlue"],
"Red"
],
"git.enableSmartCommit": true,
"editor.minimap.enabled": false,
"git.autofetch": true,
"php.validate.executablePath": "C:\\wamp64\\bin\\php\\php7.1.9\\php.exe",
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"workbench.colorTheme": "Default High Contrast",
"files.trimTrailingWhitespace": true,
"php-cs-fixer.executablePath": "${extensionPath}\\php-cs-fixer.phar",
"php-cs-fixer.lastDownload": 1538537777147,
"phpformatter.pharPath": "php-cs-fixer.phar",
"terminal.integrated.shell.windows": "C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"zenMode.hideTabs": false,
"workbench.startupEditor": "newUntitledFile",
"editor.autoClosingQuotes": "always",
"better-comments.highlightPlainText": true,
"emmet.includeLanguages": {
"javascript",
"HTML"
},
"workbench.sideBar.location": "right",
}
Run Code Online (Sandbox Code Playgroud)

小智 6

您需要验证 settings.json 格式,输入冒号:即:

{
    "yaml.schemas": {
        "file:///home/yony/.vscode/extensions/docsmsft.docs-yaml-0.2.4/schemas/toc.schema.json": "/toc\\.yml/i"
    },

    "files.associations": {
        "*.erb": "erb"
    },
    "emmet.includeLanguages": {
        "erb": "html"
    }
}
Run Code Online (Sandbox Code Playgroud)