Preserve documentation in C imports
It would be useful if go to definition on symbols imported from C had the option to jump to the C header, not cached Zig translation. One use case for this is to see comments documenting the symbol, since comments are stripped from the zig translation.
Some C libraries, like SDL, even provide documentation comments which languages like Swift preserve correctly (import SDL here is just a clang module, not language specific bindings):
It would be a convenient feature to have in zig since it's also a language with C interoperability 🙂
If the use case is solely to see comments then zig translate-c could be made to include comments in the generated Zig file (See https://github.com/ziglang/translate-c/issues/135). Is there another use case for goto definition jumping to the C file? Otherwise this issue is just https://github.com/ziglang/translate-c/issues/135.
Oh I see, I didn't think it would be a compiler issue rather than language server so I didn't find that one, I guess it's probably unnecessary in that case. :)
I'm not sure how useful jumping to C files would be in Zig, that depends on how common it is to work with both languages in one project
I am going to close this issue in favor of the Zig issue.