@wiptheia/cpp
v0.3.101529329103
Published
Theia - Cpp Extension
Downloads
29
Keywords
Readme
Theia - Cpp Extension
This extension uses Clangd to provide LSP features.
To install Clangd on Ubuntu 16.04:
$ wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
$ sudo echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main" > /etc/apt/sources.list.d/llvm.list
$ sudo apt-get update && sudo apt-get install -y clang-tools-7
$ sudo ln -s /usr/bin/clangd-7 /usr/bin/clangd
See here for detailed installation instructions.
To get accurate diagnostics, it helps to...
- ... have the build system of the C/C++ project generate a
compile_commands.json
file and... - ... point Clangd to the build directory containing said
compile_commands.json
.
#2 can be done using the cpp.buildConfigurations
preference. In your home
or your project .theia/settings.json
, define one or more build
configurations:
{
"cpp.buildConfigurations": [{
"name": "Release",
"directory": "/path/to/my/release/build"
},{
"name": "Debug",
"directory": "/path/to/my/debug/build"
}]
}
You can then select an active configuration using the
C/C++: Change Build Configuration
command from the command palette.