初始化vscode配置文件

This commit is contained in:
flykhan 2023-04-06 22:39:47 +08:00
commit 05f5164505
3 changed files with 285 additions and 0 deletions

106
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,106 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "C:\\Windows\\system32\\cmd.exe",
"args": [
"/C",
"${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe",
"&",
"pause"
],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"internalConsoleOptions": "neverOpen",
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile"
},
{
"name": "(gdb) Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"internalConsoleOptions": "neverOpen",
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": false
}
],
"preLaunchTask": "Compile"
},
{
"name": "C/C++: g++.exe 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "D:\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe 生成活动文件"
},
{
"name": "C/C++: gcc.exe 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "D:\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "将反汇编风格设置为 Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc.exe 生成活动文件"
}
]
}

109
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,109 @@
{
"workbench.sideBar.location": "left",
"window.title": "${dirty}${activeEditorLong}${separator}${rootName}${separator}${appName}",
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?·~!¥…()—【】、;:‘’“”,。《》? ",
"files.defaultLanguage": "c++", // ctrl+N
"editor.formatOnType": false, // C/C++
"editor.suggest.snippetsPreventQuickSuggestions": true, // clangdsnippetsIntellisense
"editor.acceptSuggestionOnEnter": "off", // tabIntellisense
"editor.snippetSuggestions": "inline", // snippetsinline
"C_Cpp.clang_format_sortIncludes": true, // include
"C_Cpp.autocomplete": "default", // cpptoolsclangd
"C_Cpp.suggestSnippets": true, //
"editor.fontFamily": "JetBrains Mono",
"editor.fontSize": 17, //
"editor.fontLigatures": true, // https://typeof.net/Iosevka
"editor.minimap.enabled": false, // minimap西
"editor.dragAndDrop": false, //
"editor.cursorSmoothCaretAnimation": "on", //
"editor.smoothScrolling": false, //
"files.trimTrailingWhitespace": true, //
"files.insertFinalNewline": true, // Linux
"files.autoGuessEncoding": true, // 6
"workbench.settings.useSplitJSON": false, //
"window.zoomLevel": 0, //
"git.enabled": true, // git
"git.ignoreMissingGitWarning": true, //
"[c]": {
"files.encoding": "utf8" // gbkcpp
},
"[c++]": {
"files.encoding": "utf8" // gbkcpp
},
"files.associations": {
"iostream": "cpp",
"algorithm": "cpp",
"*.tcc": "cpp",
"random": "cpp",
"fstream": "cpp",
"istream": "cpp",
"ostream": "cpp",
"regex": "cpp",
"utility": "cpp",
"array": "cpp",
"atomic": "cpp",
"bitset": "cpp",
"cctype": "cpp",
"cfenv": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"cinttypes": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"complex": "cpp",
"condition_variable": "cpp",
"csetjmp": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cuchar": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"functional": "cpp",
"iterator": "cpp",
"map": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"ratio": "cpp",
"set": "cpp",
"string": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"future": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"scoped_allocator": "cpp",
"shared_mutex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"queue": "cpp"
},
"C_Cpp.errorSquiggles": "Enabled",
}

70
.vscode/tasks.json vendored Normal file
View File

@ -0,0 +1,70 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Compile",
"command": "g++",
"args": [
"${file}",
"-o",
"${workspaceFolder}\\debug\\${fileBasenameNoExtension}.exe",
"-g",
"-Wall",
"-static-libgcc",
"-fexec-charset=utf-8"
],
"type": "process",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"problemMatcher": "$gcc"
},
{
"type": "cppbuild",
"label": "C/C++: g++.exe 生成活动文件",
"command": "D:\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "调试器生成的任务。"
},
{
"type": "cppbuild",
"label": "C/C++: gcc.exe 生成活动文件",
"command": "D:\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "调试器生成的任务。"
}
]
}