Documentation
¶
Overview ¶
Package cpp is the C and C++ language pack (SPEC §8.1, §10.15, §10.34): C, C++ and CUDA C++. The grammars and language configurations are in assets/, copied by scripts/update-assets.sh; the licenses are in third_party/ and NOTICE. Since step 24b.3 the pack also runs clangd: the server is found, started and shown by extensions/internal/langserver (the path setting clangd.path, PATH, the status item, the notification for a missing server), clangd.arguments and clangd.fallbackFlags are sent to it, the status item says when the project has no compile_commands.json and offers a .clangd with a CompileFlags stub, clangd's own file status (the state of the file in front) is shown in the item, and the pack adds the commands Switch Between Source/Header (Alt+O), Show AST (a read-only tab), Toggle inlay hints, Open project configuration file and Restart language server with vscode-clangd's ids. Since step 25.9 the pack also owns the debuggers of native programs, gdb and lldb-dap, for C, C++ and Rust (extensions/internal/nativedebug; the Rust pack adds its cargo targets).
Index ¶
Constants ¶
const ( // ID is the id of the extension, and ServerID the id of the language server clangd in its manifest. ID = "emetos.cpp" ServerID = "clangd" // PathSetting holds the path of the clangd program (the name vscode-clangd gives it). PathSetting = "clangd.path" // ArgumentsSetting holds the arguments clangd is started with. ArgumentsSetting = "clangd.arguments" // FallbackFlagsSetting holds the flags clangd parses a file with when the project has no compilation database. FallbackFlagsSetting = "clangd.fallbackFlags" // TraceFileSetting names a file clangd writes a performance trace to (CLANGD_TRACE). TraceFileSetting = "clangd.trace" // TraceSetting traces the traffic with the server (the host's, as for the other packs). TraceSetting = "clangd.trace.server" )
The ids of the extension.
const ( // SwitchHeaderSourceCommand opens the header of a source file, or the source of a header. SwitchHeaderSourceCommand = "clangd.switchheadersource" // RestartCommand restarts clangd. RestartCommand = "clangd.restart" // ASTCommand shows the syntax tree of clangd for the selection, or the cursor, in a read-only tab. ASTCommand = "clangd.ast" // ToggleInlayHintsCommand turns the inlay hints of the editor on or off. ToggleInlayHintsCommand = "clangd.inlayHints.toggle" // ProjectConfigCommand opens the .clangd of the project, and offers to create it when there is none. ProjectConfigCommand = "clangd.projectConfig" )
The commands of the pack, with the ids of vscode-clangd.
const ( // TestControllerID is the id of the controller and TestControllerLabel its name. TestControllerID = "ctest" TestControllerLabel = "CTest" )
The names of the controller and of its two run profiles.
const ( // BuildDirectorySetting is the folder CMake configured the project into, where ctest runs: absolute, or relative to the workspace // folder; ${workspaceFolder} stands for the folder. It is CMake Tools' cmake.buildDirectory with Emetos's own name (decision 1700). BuildDirectorySetting = "emetos.cpp.ctest.buildDirectory" // SuiteDelimiterSetting splits the name of a test into the groups of the tree, like CMake Tools' cmake.ctest.testSuiteDelimiter: with // "." the test Calc.Adds is the test Adds in the group Calc. SuiteDelimiterSetting = "emetos.cpp.ctest.testSuiteDelimiter" )
The settings of the Testing provider (SPEC §10.32 "The providers", C and C++; "As built (step 26.9)").
const ContentScheme = "clangd"
ContentScheme is the scheme of the read-only documents the pack provides (the AST).
const InlayHintsSetting = "editor.inlayHints.enabled"
InlayHintsSetting is the setting of the editor the command Toggle inlay hints flips.
const RequirementCTest = "ctest"
RequirementCTest is the id of the requirement of ctest.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.