As my code completer I am using clangd. Clangd automatically includes the relevant header when completing a function/struct/class. When code-completing a Vulkan-Hpp enum, it will include the header <vulkan/vulkan_enum.hpp>. Similarly for structs.
The headers vulkan_enums.hpp, vulkan_funcs.hpp and vulkan_structs.hpp are not meant to be included standalone from what I understand. They are meant to be included as part of including vulkan.hpp. When these headers are included standalone, a compilation error is the result.
I believe what is needed to make clangd (and also the include-what-you-use tool) insert the correct header completion is to add a line like this to the three files:
As my code completer I am using clangd. Clangd automatically includes the relevant header when completing a function/struct/class. When code-completing a Vulkan-Hpp enum, it will include the header
<vulkan/vulkan_enum.hpp>
. Similarly for structs.The headers
vulkan_enums.hpp
,vulkan_funcs.hpp
andvulkan_structs.hpp
are not meant to be included standalone from what I understand. They are meant to be included as part of includingvulkan.hpp
. When these headers are included standalone, a compilation error is the result.Clangd respects the include-what-you-use pragmas: https://clangd.llvm.org/guides/include-cleaner#iwyu-pragmas
I believe what is needed to make clangd (and also the include-what-you-use tool) insert the correct header completion is to add a line like this to the three files:
See also: https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUPragmas.md#iwyu-pragma-private