Skip to content

Example showing how to connect Buck with the C/C++ extension for VS Code 🔮

Notifications You must be signed in to change notification settings

njlr/buck-vs-code-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

buck-vs-code-example

Example showing how to connect Buck with the C/C++ extension for VS Code.

This project depends on the Eigen Buckaroo package to demonstrate code-completion for packages.

Usage

buckaroo install
code .

Open main.cpp, and give it a try!

How it Works

To generate the compile_commands.json file, use the compilation-database flavor:

buck build //:app#compilation-database --show-output

Buck probably put the file here:

cat buck-out/gen/__app#compilation-database/compile_commands.json

Next, we have to tell VS Code where to find it.

.vscode/c_cpp_properties.json

{
  "configurations": [
    {
      "name": "app",
      "compileCommands": "buck-out/gen/__app#compilation-database/compile_commands.json"
    }
  ],
  "version": 4
}

About

Example showing how to connect Buck with the C/C++ extension for VS Code 🔮

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published