VSCode 编辑器配置
配置说明
步骤:文件 > 首选项 > 设置 > 打开设置(json)
文件相关
排除文件
"files.exclude": {
"**/.tmp_versions": true,
"**/*.cmd": true,
"**/*.dll": true,
"**/*.ko": false,
"**/*.lib": true,
"**/*.mod.c": true,
"**/*.o": true,
"**/*.order": true,
"**/*.so": true,
"**/*.symvers": true
},
猜测编码打开
"files.autoGuessEncoding": true,
失去焦点保存
"files.autoSave": "onFocusChange",
格式化代码
设置格式化程序
"[c]": {
"editor.defaultFormatter": "ms-vscode.cpptools"
},
保存与行格式化
"editor.formatOnSave": true,
"editor.formatOnType": true,
C_CPP配置
"C_Cpp.updateChannel": "Insiders",
"C_Cpp.default.includePath": [
"${workspaceFolder}/**",
"D:\\Program_Files\\kernel\\include",
"D:\\Program_Files\\kernel\\include\\uapi",
"D:\\Program_Files\\kernel\\arch\\arm\\include",
"D:\\Program_Files\\kernel\\arch\\arm\\include\\uapi",
"D:\\Program_Files\\kernel\\arch\\arm\\include\\generated"
],
"C_Cpp.default.defines": [
"__KERNEL__",
"CONFIG_SPARSE_IRQ"
],
"C_Cpp.default.compilerPath": "D:\\Program_Files\\Qt\\Tools\\mingw730_32\\bin\\gcc.exe",
"C_Cpp.default.intelliSenseMode": "gcc-x86",
"C_Cpp.default.cStandard": "c11",