fix(imports): use clangd-friendly cpp imports #225

Open
ChEnylnti wants to merge 1 commit from ChEnylnti/fix/cpp-imports-clangd into master
ChEnylnti commented 2026-06-18 00:20:13 -05:00 (Migrated from github.com)

Summary

  • replace the default C++ bits/stdc++.h import with standard library headers
  • add IWYU pragma: keep to avoid clangd unused include diagnostics
  • update the injector example in README

Motivation

This follows up on #216.

bits/stdc++.h is a GCC-specific header. On macOS, Apple clangd reports it as missing, which also breaks common completions and diagnostics for symbols like vector.

Since injected imports are editor-only and not submitted, using standard headers makes the default C++ editing experience more portable.

Tested locally with clangd: diagnostics are clean.

## Summary - replace the default C++ `bits/stdc++.h` import with standard library headers - add `IWYU pragma: keep` to avoid clangd unused include diagnostics - update the injector example in README ## Motivation This follows up on #216. `bits/stdc++.h` is a GCC-specific header. On macOS, Apple clangd reports it as missing, which also breaks common completions and diagnostics for symbols like `vector`. Since injected imports are editor-only and not submitted, using standard headers makes the default C++ editing experience more portable. Tested locally with clangd: diagnostics are clean.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin ChEnylnti/fix/cpp-imports-clangd:ChEnylnti/fix/cpp-imports-clangd
git switch ChEnylnti/fix/cpp-imports-clangd

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch master
git merge --no-ff ChEnylnti/fix/cpp-imports-clangd
git switch ChEnylnti/fix/cpp-imports-clangd
git rebase master
git switch master
git merge --ff-only ChEnylnti/fix/cpp-imports-clangd
git switch ChEnylnti/fix/cpp-imports-clangd
git rebase master
git switch master
git merge --no-ff ChEnylnti/fix/cpp-imports-clangd
git switch master
git merge --squash ChEnylnti/fix/cpp-imports-clangd
git switch master
git merge --ff-only ChEnylnti/fix/cpp-imports-clangd
git switch master
git merge ChEnylnti/fix/cpp-imports-clangd
git push origin master
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
arduinohatesme/leetcode.nvim!225
No description provided.