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

VS Code JavaScript内置代码片段不显示问题求助

VS Code JavaScript自动补全及代码片段失效问题

近期我的VS Code中JavaScript自动补全缺失大量默认选项,所有内置代码片段无法生效,自定义代码片段也不显示。该问题随机出现,请问这是VS Code近期更新导致的Bug,还是我的设置存在问题?

以下是我的settings.json配置:

{
    "emmet.includeLanguages": {
        "javascript": "javascriptreact",
        "postcss": "css"
    },
    "breadcrumbs.enabled": true,
    "tslint.configFile": "/dev-gulp/.sass-lint.yml",
    "editor.tabSize": 2,
    "scssLint.configDir": "/dev-gulp/.sass-lint.yml",
    "prettier.eslintIntegration": true,
    "sasslint.configFile": "/dev-gulp/.sass-lint.yml",
    "vsprettier.packageManager": "npm",
    "prettier.stylelintIntegration": true,
    "prettier.singleQuote": true,
    "prettier.useTabs": true,
    "workbench.colorCustomizations": {
        "activityBarBadge.background": "#64FFDA",
        "list.activeSelectionForeground": "#64FFDA",
        "list.inactiveSelectionForeground": "#64FFDA",
        "list.highlightForeground": "#64FFDA",
        "scrollbarSlider.activeBackground": "#64FFDA50",
        "editorSuggestWidget.highlightForeground": "#64FFDA",
        "textLink.foreground": "#64FFDA",
        "progressBar.background": "#64FFDA",
        "pickerGroup.foreground": "#64FFDA",
        "tab.activeBorder": "#64FFDA",
        "notificationLink.foreground": "#64FFDA",
        "editorWidget.resizeBorder": "#64FFDA",
        "editorWidget.border": "#64FFDA",
        "settings.modifiedItemIndicator": "#64FFDA",
        "settings.headerForeground": "#64FFDA",
        "panelTitle.activeBorder": "#64FFDA",
        "breadcrumb.activeSelectionForeground": "#64FFDA",
        "menu.selectionForeground": "#64FFDA",
        "menubar.selectionForeground": "#64FFDA",
        "editor.findMatchBorder": "#64FFDA",
        "selection.background": "#64FFDA40"
    },
    "materialTheme.accent": "Bright Teal",
    "workbench.iconTheme": "material-icon-theme",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    "git.autofetch": true,
    "javascript.updateImportsOnFileMove.enabled": "always",
    "explorer.confirmDragAndDrop": false,
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "tabnine.experimentalAutoImports": true,
    "liveServer.settings.donotShowInfoMsg": true,
    "editor.formatOnSave": true,
    "javascript.format.insertSpaceAfterConstructor": true,
    "prettier.printWidth": 500,
    "html.format.wrapLineLength": 100,
    "workbench.colorTheme": "One Monokai",
    "editor.formatOnPaste": true,
    "eslint.format.enable": true,
    "svelte.enable-ts-plugin": true,
    "[svelte]": {
        "editor.defaultFormatter": "svelte.svelte-vscode"
    },
    "svelte.plugin.svelte.note-new-transformation": false,
    "window.zoomLevel": 1,
    "chatgpt.chromiumPath": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe",
    "chatgpt.gpt3.apiKey": "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",
    "git.postCommitCommand": "push",
    "emmet.preferences": {
        "javascript": "javascriptreact"
    },
    "editor.snippetSuggestions": "top",
    "editor.tabCompletion": "on",
    "settingsSync.ignoredExtensions": []
}

问题示例截图

  • 无循环代码片段示例:
    无循环代码片段示例
  • 无console.log代码片段示例:
    无console.log代码片段示例

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.01 08:56:09