Files with the .h extension are currently treated as C source code. However, the extension is also used for C++. It would be nice if Geany filetype auto detection switched the header type to C/C++ based on whether a corresponding source file is found.

For instance, many projects match .cc and .h files. If both filename.cc and filename.h exist, it would be reasonable to expect the .h file to be a C++ header. But if filename.c is found instead, the .h file is most likely a C header.

Since there are fewer C file extensions to check (just .c), the default could be for .h files to be treated as C++ and switched to C if a corresponding .c file is found. There is a potential issue when isolated .h files are loaded. I don't know how bothersome it would be fore users to have C files treated as C++.

Another option is to treat .h files as C and to switch filetype when a .cc file is detected, since that seems to be the most common mismatched pair.

Notes:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.