@wiptheia/cpp

0.3.101529329103 • Public • Published

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...

  1. ... have the build system of the C/C++ project generate a compile_commands.json file and...
  2. ... 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.

License

Apache-2.0

Readme

Keywords

Package Sidebar

Install

npm i @wiptheia/cpp

Weekly Downloads

29

Version

0.3.101529329103

License

Apache-2.0

Unpacked Size

108 kB

Total Files

58

Last publish

Collaborators

  • eclipse_che
  • florentbenoit