https://github.com/zaucy/vscode-bazel-cpp-example
Example of a C++ project with VSCode, Bazel, and working autocomplete
https://github.com/zaucy/vscode-bazel-cpp-example
Last synced: 6 months ago
JSON representation
Example of a C++ project with VSCode, Bazel, and working autocomplete
- Host: GitHub
- URL: https://github.com/zaucy/vscode-bazel-cpp-example
- Owner: zaucy
- License: mit
- Created: 2021-07-21T00:33:49.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-10-27T20:52:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-28T00:58:37.182Z (almost 2 years ago)
- Language: Starlark
- Homepage:
- Size: 657 KB
- Stars: 21
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Example C++ repository built with Bazel using VSCode
This example has 2 useful scripts
* `bazel run //:copy_compile_commands` - A way to generate `compile_commands.json` so that you may use a language server such as clangd for autocomplete
* `bazel run //:copy_vscode_config_files` - A way to create launch VSCode configurations with correctly set `sourceFileMap` settings. See `.vscode/launch.json-tpl`
This all works thanks to [hedronvision/bazel-compile-commands-extractor](https://github.com/hedronvision/bazel-compile-commands-extractor) and [zaucy/bzlws](https://github.com/zaucy/bzlws) (a tool I made.) This repository was made for [this discussion](https://github.com/bazelbuild/vscode-bazel/issues/179) at [bazelbuild/vscode-bazel](https://github.com/bazelbuild/vscode-bazel).
## Autocomplete with clangd

## Launch with debugger
