Editor setup instructions.
-
Install required extensions.
- CMake Tools
ms-vscode.cmake-tools
- clangd
llvm-vs-code-extensions.vscode-clangd
- CodeLLDB
vadimcn.vscode-lldb
- CMake Tools
-
Install optional extension for license formatting.
- Reflow Markdown
marvhen.reflow-markdown
- Reflow Markdown
-
Add required user or workspace settings.
{
"clangd.arguments": [
"--experimental-modules-support",
"--header-insertion=never",
],
"clangd.onConfigChanged": "restart",
"cmake.copyCompileCommands": "${workspaceFolder}/build/compile_commands.json",
"cmake.ctest.testExplorerIntegrationEnabled": true,
"cmake.useCMakePresets": "always",
"cmake.debugConfig": {
"name": "LLDB",
"type": "lldb",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${command:cmake.launchTargetPath}",
"args": []
},
"reflowMarkdown.preferredLineLength": 76,
}
- Add recommended user settings.
{
"cmake.buildBeforeRun": true,
"cmake.configureOnOpen": true,
"cmake.options.statusBarVisibility": "compact",
"cmake.options.advanced": {
"configurePreset": {
"statusBarVisibility": "compact"
},
"build": {
"statusBarVisibility": "icon"
},
"buildPreset": {
"statusBarVisibility": "compact"
},
"buildTarget": {
"statusBarVisibility": "compact"
},
"debug": {
"statusBarVisibility": "hidden",
},
"launch": {
"statusBarVisibility": "icon"
},
"launchTarget": {
"statusBarVisibility": "compact"
},
"testPreset": {
"statusBarVisibility": "hidden"
},
"ctest": {
"statusBarVisibility": "icon"
},
"packagePreset": {
"statusBarVisibility": "hidden"
},
"cpack": {
"statusBarVisibility": "icon"
},
"workflowPreset": {
"statusBarVisibility": "hidden"
},
"workflow": {
"statusBarVisibility": "hidden"
}
},
"debug.showInStatusBar": "never",
// When VS Code draws it's own window decorations.
//"debug.toolBarLocation": "commandCenter",
"lldb.showDisassembly": "auto",
"lldb.dereferencePointers": true,
"lldb.consoleMode": "commands",
"lldb.displayFormat": "auto",
}
- Add recommended user settings on Linux.
{
"clangd.path": "/opt/ace/bin/clangd",
"cmake.cmakePath": "/opt/cmake/bin/cmake",
}
- Add recommended user settings on Windows.
{
"clangd.path": "C:/Ace/bin/clangd.exe",
}
Recommended keyboard shortcuts.
[
{
"key": "f5",
"command": "cmake.debugTarget",
"when": "!inDebugMode"
},
{
"key": "f5",
"command": "workbench.action.debug.pause",
"when": "inDebugMode && debugState == 'running'"
},
{
"key": "f5",
"command": "workbench.action.debug.continue",
"when": "inDebugMode && debugState != 'running'"
},
{
"key": "ctrl+f5",
"command": "cmake.launchTarget"
},
{
"key": "pausebreak",
"command": "workbench.action.togglePanel"
}
]