首页 > 开发工具 > VSCode > 正文

Vscode如何设置自动补全触发?Vscode智能提示灵敏度

穿越時空
发布: 2025-07-02 18:14:01
原创
918人浏览过

要配置vscode的自动补全触发,需修改settings.json文件中的相关设置。1. 打开设置界面:使用快捷键ctrl + shift + p (windows/linux) 或 cmd + shift + p (macos),输入"open settings (json)"并选择;2. 修改settings.json:添加或调整以下配置项以控制补全行为,如"editor.quicksuggestions"用于设置在不同场景下是否启用快速建议、"editor.suggestontriggercharacters"决定是否在触发字符后显示建议、"editor.suggest.insertmode"指定插入模式等;3. 根据需要自定义其他与语言、格式化和编辑体验相关的选项,例如设置默认格式化工具、代码验证规则、界面主题及字体大小等,从而全面优化开发环境。所有更改保存后即时生效,提升编码效率。

Vscode如何设置自动补全触发?Vscode智能提示灵敏度

Vscode的自动补全触发主要通过配置来实现,调整智能提示的灵敏度能让你在编码时更顺畅。简单来说,就是修改settings.json文件,让Vscode知道你希望在输入哪些字符后触发补全,以及调整延迟时间。

Vscode如何设置自动补全触发?Vscode智能提示灵敏度

解决方案:

Vscode如何设置自动补全触发?Vscode智能提示灵敏度
  1. 打开设置: 按下 Ctrl + Shift + P (Windows/Linux) 或 Cmd + Shift + P (macOS),输入 "Open Settings (JSON)" 并选择。

    Vscode如何设置自动补全触发?Vscode智能提示灵敏度
  2. 修改settings.json: 在打开的settings.json文件中,添加或修改以下配置项:

{
  "editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": true
  },
  "editor.suggestOnTriggerCharacters": true,
  "editor.suggestSelection": "first",
  "editor.snippetSuggestions": "top",
  "editor.suggest.insertMode": "insert",
  "editor.suggest.localityBonus": true,
  "editor.suggest.shareSuggestSelections": true,
  "editor.suggest.showMethods": true,
  "editor.suggest.showFunctions": true,
  "editor.suggest.showConstructors": true,
  "editor.suggest.showFields": true,
  "editor.suggest.showVariables": true,
  "editor.suggest.showClasses": true,
  "editor.suggest.showInterfaces": true,
  "editor.suggest.showModules": true,
  "editor.suggest.showProperties": true,
  "editor.suggest.showEnums": true,
  "editor.suggest.showKeywords": true,
  "editor.suggest.showSymbols": true,
  "editor.suggest.showColors": true,
  "editor.suggest.showFiles": true,
  "editor.suggest.showReferences": true,
  "editor.suggest.showFolders": true,
  "editor.suggest.showTypeParameters": true,
  "editor.suggest.showIssues": true,
  "[javascript]": {
    "editor.suggest.insertMode": "replace"
  },
  "[typescript]": {
    "editor.suggest.insertMode": "replace"
  },
  "editor.parameterHints.enabled": true,
  "files.associations": {
    "*.vue": "vue",
    "*.wpy": "wepy",
    "*.wxss": "css",
    "*.wxml": "html"
  },
  "emmet.includeLanguages": {
    "wxml": "html"
  },
  "javascript.implicitProjectConfig.experimentalDecorators": true,
  "window.zoomLevel": 0,
  "git.confirmSync": false,
  "git.autofetch": true,
  "files.autoSave": "afterDelay",
  "files.autoSaveDelay": 1000,
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.validate": [
    "javascript",
    "javascriptreact",
    "typescript",
    "typescriptreact",
    "vue",
    "html"
  ],
  "workbench.colorTheme": "One Dark Pro",
  "workbench.iconTheme": "material-icon-theme",
  "window.titleBarStyle": "custom",
  "terminal.integrated.fontSize": 14,
  "terminal.integrated.lineHeight": 1.2,
  "security.workspace.trust.untrustedFiles": "open",
  "editor.fontSize": 16,
  "editor.lineHeight": 1.5,
  "editor.letterSpacing": 0.5,
  "editor.wordWrap": "on",
  "editor.mouseWheelZoom": true,
  "liveServer.settings.donotVerifyTags": true,
  "liveServer.settings.fullReload": true,
  "liveServer.settings.CustomBrowser": "chrome",
  "liveServer.settings.donotShowInfoMsg": true,
  "breadcrumbs.enabled": false,
  "window.menuBarVisibility": "compact",
  "debug.console.fontSize": 14,
  "editor.minimap.enabled": false,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "typescript.updateImportsOnFileMove.enabled": "always",
  "extensions.ignoreRecommendations": true,
  "workbench.editor.enablePreview": false,
  "editor.renderWhitespace": "none",
  "editor.cursorBlinking": "smooth",
  "editor.renderIndentGuides": false,
  "editor.guides.bracketPairs": false,
  "editor.matchBrackets": "never",
  "workbench.startupEditor": "none",
  "update.mode": "manual",
  "editor.unicodeHighlight.nonBasicASCII": false,
  "editor.find.seedSearchStringFromSelection": "never",
  "git.openRepositoryInParentFolders": "never",
  "window.nativeTabs": false,
  "explorer.confirmDelete": false,
  "editor.stickyScroll.enabled": true,
  "editor.foldingStrategy": "indentation",
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "javascript.preferences.quoteStyle": "single",
  "typescript.preferences.quoteStyle": "single",
  "html.format.indentInnerHtml": true,
  "html.format.wrapAttributes": "auto",
  "html.format.wrapLineLength": 0,
  "html.format.indentHandlebars": true,
  "html.format.contentUnformatted": "pre, code, textarea",
  "html.format.extraLiners": "",
  "html.format.templating": true,
  "html.format.unformatted": "wbr",
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": true,
  "javascript.format.placeOpenBraceOnNewLineForControlStructures": true,
  "javascript.format.placeOpenBraceOnNewLineForFunctions": true,
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": true,
  "typescript.format.placeOpenBraceOnNewLineForControlStructures": true,
  "typescript.format.placeOpenBraceOnNewLineForFunctions": true,
  "javascript.validate.enable": false,
  "typescript.validate.enable": false,
  "editor.links": false,
  "editor.stickyScroll.scrollWithEditor": true,
  "git.ignoreLimitWarning": true,
  "editor.occurrencesHighlight": false,
  "editor.renameOnType": true,
  "editor.inlineSuggest.enabled": true,
  "github.copilot.enable": {
    "*": true,
    "yaml": false,
    "plaintext": false,
    "markdown": true,
    "scminput": false
  },
  "chat.experimental.markdownRendering": true,
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/Thumbs.db": true,
    "node_modules": true
  },
  "explorer.compactFolders": false,
  "window.commandCenter": false,
  "javascript.suggest.paths": false,
  "typescript.suggest.paths": false,
  "editor.defaultFoldingRangeProvider": "indentation",
  "notebook.breadcrumbs.showCodeCells": "all",
  "terminal.integrated.tabs.enabled": true,
  "terminal.integrated.persistentSessionReviveProcess": "onExit",
  "notebook.lineNumbers": "on",
  "notebook.cellToolbarLocation": {
    "default": "right",
    "jupyter-notebook": "left"
  },
  "editor.guides.indentation": false,
  "editor.guides.highlightActiveIndentation": false,
  "git.untrackedChanges": "hidden",
  "javascript.inlayHints.parameterNames.enabled": "all",
  "typescript.inlayHints.parameterNames.enabled": "all",
  "editor.inlayHints.enabled": "on",
  "workbench.editor.pinnedTabSizing": "shrink",
  "workbench.list.smoothScrolling": true,
  "editor.bracketPairColorization.enabled": false,
  "editor.guides.bracketPairsHorizontal": false,
  "editor.guides.bracketPairs": "active",
  "editor.smoothScrolling": true,
  "files.trimAutoWhitespace": true,
  "workbench.editor.decorations.badges": false,
  "workbench.editor.decorations.colors": false,
  "javascript.preferences.importModuleSpecifierEnding": "js",
  "typescript.preferences.importModuleSpecifierEnding": "js",
  "javascript.format.semicolons": "insert",
  "typescript.format.semicolons": "insert",
  "eslint.codeAction.showDocumentation": {
    "enable": true
  },
  "css.validate": false,
  "less.validate": false,
  "scss.validate": false,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "vue.codeActions.eslint.autoFixOnSave": true,
  "editor.linkedEditing": true,
  "javascript.autoClosingTags": true,
  "typescript.autoClosingTags": true,
  "editor.foldingImportsByDefault": true,
  "files.insertFinalNewline": true,
  "files.trimTrailingWhitespace": true,
  "editor.showUnused": true,
  "diffEditor.ignoreTrimWhitespace": false,
  "editor.renderControlCharacters": false,
  "window.dialogStyle": "native",
  "editor.occurrencesHighlightMaxRanges": 5000,
  "editor.padding.top": 10,
  "editor.padding.bottom": 10,
  "editor.showDeprecated": false,
  "editor.tabSize": 2,
  "editor.detectIndentation": false,
  "editor.insertSpaces": false,
  "editor.useTabStops": false,
  "editor.wordBasedSuggestions": false,
  "editor.suggest.showStatusBar": true,
  "editor.suggest.maxVisibleSuggestions": 50,
  "editor.guides.highlightActiveBracketPair": false,
  "editor.guides.bracketPairsBorderStyle": "dashed",
  "editor.stickyScroll.defaultModel": "indentation",
  "editor.stickyScroll.maxLineCount": 10,
  "editor.foldingStrategy": "auto",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight": false,
  "editor.foldingStrategy": "indentation",
  "editor.foldingImportsByDefault": true,
  "editor.foldingMaximumRegions": 5000,
  "editor.foldingHighlight
登录后复制

以上就是Vscode如何设置自动补全触发?Vscode智能提示灵敏度的详细内容,更多请关注php中文网其它相关文章!

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号