打开setting.json
Ctrl+Shift+P (Windows) 快捷键,然后输入setting.json,选择open user那个,路径一般是在C:\Users\Administrator\AppData\Roaming\Code\User
修改增加内容:
c
{
"editor.tabCompletion": "on",
"editor.acceptSuggestionOnEnter": "on",
// 添加以下配置
"editor.suggestSelection": "first",
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.inlineSuggest.enabled": true,
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
}
}
然后重启或者更新
按 Ctrl+Shift+P (Windows) 或 Cmd+Shift+P (Mac)
输入 "Developer: Reload Window" 重新加载窗口
使用,代码推荐按tab就接受补全