I dont think there is any (ROS) extension that fixes your particular problem but VS Code has its own way of dealing with including path to external libraries. You can edit your .vscode/c_cpp_properties.json
file which gets created when you open your packet directory with VSCode. It allows you to define includePath
for VSCode to use when you want to include external library (like /usr/include, ros system includes etc.) and access its exposed variables/functions. It edits this on its own to some extent, but you can always edit it yourself like this:
"includePath": [
"PATH_TO_MY_OTHER_PACKAGE/include", <--- if you keep your headers here
"/home/user/catkin_ws/devel/include",
"/usr/include/"]
This will not link your build to any of libraries you include into path, it is just a useful feature for VS Code to help developers get access to libraries and get rid of annoying editor warnings in bigger environments where you have to link external libraries.
Not related to your direct problem but there is also this extension for ROS which might help you with its own features and I personally use this extension to get all other c++ related syntax highlighting and features and I would recommended it to everyone.
EDIT:
Under ROS extension I mentioned earlier this is stated:
Automatically add the ROS C++ include
and Python import paths.
Im not sure how much it does things on its own, but It could be helpful to have it.