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

解决方案:
自由画布
百度文库和百度网盘联合开发的AI创作工具类智能体
73 查看详情

打开设置: 按下 Ctrl + Shift + P (Windows/Linux) 或 Cmd + Shift + P (macOS),输入 “Open Settings (JSON)” 并选择。

修改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智能提示灵敏度的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/486759.html
微信扫一扫
支付宝扫一扫