【问题标题】:VScode settings.json show error "End of file expected"VScode settings.json 显示错误“预期文件结尾”
【发布时间】:2020-02-06 05:34:01
【问题描述】:

这段代码是我的 VScode settings.json。 但我不知道为什么它显示 "End of file expected" jsonc(0) [5, 1]

开始我只想在我的终端上输入 int。 但它不能,所以我在终端中打开运行 'v' 是否在集成终端中运行代码。 和 弹出 'Failed to write user settings. Please turn it on to correct any errors / warnings and try again.'

并尝试设置 运行代码配置 选择在终端运行 再次弹出 'Failed to write user settings. Please turn it on to correct any errors / warnings and try again.'

{
    "files.autoSave": "onWindowChange",
    "editor.quickSuggestionsDelay": 60
}
{
    // Controls if quick suggestions should show up while typing
    "editor.quickSuggestions": {
        "other": true,
        "comments": false,
        "strings": false
    },

    // Controls if suggestions should be accepted on 'Enter' - in addition to 'Tab'. Helps to avoid ambiguity between inserting new lines or accepting suggestions. The value 'smart' means only accept a suggestion with Enter when it makes a textual change
    "editor.acceptSuggestionOnEnter": "on",

    // Controls the delay in ms after which quick suggestions will show up.
    "editor.quickSuggestionsDelay": 10,

    // Controls if suggestions should automatically show up when typing trigger characters
    "editor.suggestOnTriggerCharacters": true,

    // Controls if pressing tab inserts the best suggestion and if tab cycles through other suggestions
    "editor.tabCompletion": "on",

    // Controls whether sorting favours words that appear close to the cursor
    "editor.suggest.localityBonus": true,

    // Controls how suggestions are pre-selected when showing the suggest list
    "editor.suggestSelection": "recentlyUsed",

    // Enable word based suggestions
    "editor.wordBasedSuggestions": true,

    // Enable parameter hints
    "editor.parameterHints.enabled": true,
}

【问题讨论】:

    标签: vscode-settings


    【解决方案1】:

    我不知道。 在我在 [5, 1] 之后删除之前。会正常的。

    【讨论】:

      【解决方案2】:

      删除} {

      {
        "files.autoSave": "onWindowChange",
        "editor.quickSuggestionsDelay": 60, // add comma to end here
      // } --<  remove this -----------------------------------------
      // { --<  remove this too -----------------------------------------
       ..... rest is good
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2014-12-11
        • 1970-01-01
        • 2021-04-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多