You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

VS Code安装emojisense插件报错:End of file expected .jsonc [Ln 1, Col 23]

解决emojisense插件的JSONC语法错误及触发补全问题

错误原因

你将VS Code原生配置项"javascript.validate.enable": false错误嵌套在了emojisense.languages对象内部,破坏了JSON的结构完整性,这直接导致了End of file expected .jsonc语法报错。

修正后的配置代码

将"javascript.validate.enable": false移到emojisense.languages对象外部,确保每个配置项层级正确:

"emojisense.languages": {
    "plaintext": {
        "markupCompletionsEnabled": true,
        "emojiDecoratorsEnabled": true
    },
    "abap": true,
    "bat": true,
    "bibtex": true,
    "clojure": true,
    "coffeescript": true,
    "c": true,
    "cpp": true,
    "csharp": true,
    "css": true,
    "diff": true,
    "dockerfile": true,
    "fsharp": true,
    "git-commit": true,
    "git-rebase": true,
    "go": true,
    "groovy": true,
    "handlebars": true,
    "html": true,
    "ini": true,
    "java": true,
    "javascript": true,
    "javascriptreact": true,
    "json": true,
    "jsonc": true,
    "latex": true,
    "less": true,
    "lua": true,
    "makefile": true,
    "markdown": true,
    "objective-c": true,
    "objective-cpp": true,
    "perl6": true,
    "php": true,
    "powershell": true,
    "jade": true,
    "python": true,
    "r": true,
    "razor": true,
    "ruby": true,
    "rust": true,
    "scss": true,
    "sass": true,
    "shaderlab": true,
    "shellscript": true,
    "sql": true,
    "swift": true,
    "typescript": true,
    "typescriptreact": true,
    "tex": true,
    "vb": true,
    "xml": true,
    "xsl": true,
    "yaml": true
},
"javascript.validate.enable": false

确保":"触发emoji补全

  1. 确认目标语言的markupCompletionsEnabled已开启(比如你配置的plaintext已经开启)
  2. 检查VS Code基础补全设置,确保字符串场景下补全触发:
"editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
}

保存配置后重启VS Code,输入":"即可触发emoji建议补全。

内容的提问来源于stack exchange,提问作者Yordan Patronski

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.16 22:20:18