Skip to content

CMake: Set up compile_commands.json automatically #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

jchadwick-buf
Copy link
Member

This allows clangd to provide code intelligence. Most completions will work after configuration, although some completions (e.g. involving generated code) will require a build.

Generating a compile_commands.json file is non-trivial for Bazel so this should enable a better developer experience for people working on protovalidate-cc. Clangd can be used with a large variety of editors (Vim, Zed, Visual Studio Code, etc.)

This allows clangd to provide code intelligence. Most completions will work after configuration, although some completions (e.g. involving generated code) will require a build.

Generating a compile_commands.json file is non-trivial for Bazel so this should enable a better developer experience for people working on protovalidate-cc. Clangd can be used with a large variety of editors (Vim, Zed, Visual Studio Code, etc.)
@jchadwick-buf jchadwick-buf force-pushed the jchadwick/cmake-setup-clangd branch from f91b6bc to 13b882f Compare March 25, 2025 20:25
@jchadwick-buf jchadwick-buf changed the title Jchadwick/cmake-setup-clangd CMake: Set up compile_commands.json automatically Mar 25, 2025
@jchadwick-buf
Copy link
Member Author

I split this out while working on the improvements to the standard library, since I don't want to bloat up that changeset with anything unrelated (but would really appreciate proper code intelligence in my editor(s).) It is not urgent.

@jchadwick-buf jchadwick-buf requested a review from smaye81 March 25, 2025 20:39
@jchadwick-buf jchadwick-buf merged commit 2d7d546 into main Mar 25, 2025
9 checks passed
@jchadwick-buf jchadwick-buf deleted the jchadwick/cmake-setup-clangd branch March 25, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants