Skip to content

Latest commit

 

History

History
145 lines (131 loc) · 3.08 KB

editor.md

File metadata and controls

145 lines (131 loc) · 3.08 KB

Editor

Editor setup instructions.

VSCode/VSCodium

  1. Install and configure VSCode or VSCodium.

  2. Install required extensions.

    • CMake Tools ms-vscode.cmake-tools
    • clangd llvm-vs-code-extensions.vscode-clangd
    • CodeLLDB vadimcn.vscode-lldb
  3. Install optional extension for license formatting.

    • Reflow Markdown marvhen.reflow-markdown
  4. 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,
}
  1. 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",
}
  1. Add recommended user settings on Linux.
{
  "clangd.path": "/opt/ace/bin/clangd",
  "cmake.cmakePath": "/opt/cmake/bin/cmake",
}
  1. 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"
  }
]