首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >VScode settings.json显示错误“预期文件结束”

VScode settings.json显示错误“预期文件结束”
EN

Stack Overflow用户
提问于 2020-02-06 13:34:02
回答 2查看 1.9K关注 0票数 0

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

开始,我只想在我的终端上输入int。但是它不能,所以我打开Run in terminal '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.'

代码语言:javascript
运行
复制
{
    "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,
}
EN

回答 2

Stack Overflow用户

发布于 2020-02-06 13:57:18

我不知道。在我删除之前,5,1。这将是正常的。

票数 0
EN

Stack Overflow用户

发布于 2020-02-06 14:20:54

删除} {

代码语言:javascript
运行
复制
{
  "files.autoSave": "onWindowChange",
  "editor.quickSuggestionsDelay": 60, // add comma to end here
// } --<  remove this -----------------------------------------
// { --<  remove this too -----------------------------------------
 ..... rest is good
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60088278

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档