Enrico Tröger wrote:
On Thu, 26 Mar 2009 16:00:49 -0700, Bob wrote:
I'm using Geany for work on a rather large C++ codebase where all of the header files have .h suffixes. Most of the declarations in these header files are inside namespaces and class declarations and apparently the tag parser only sees these as C headers and not C++ headers, so none of these declarations show up in the Symbols pane.
If I rename the files to .hh or .hpp then all the declarations show up. If I remove the enclosing namespace or class, then the declarations appear even when the suffix is .c
Is there any way to tell Geany to treat these .h files as C++ code?
Yes, create/edit the file ~/.config/geany/filetype_extensions.conf and add/edit the following content:
[Extensions] C=*.c; C++=*.cpp;*.cxx;*.c++;*.cc;*.h;*.hpp;*.hxx;*.h++;*.hh;*.C;*.h;
this will overwrite the default filetype extensions for C and C++ and moves *.h from the filetype C to C++. Downside of this is that *all* header files will now be opened as C++.
Thanks Enrico. This has solved my problem. I had tried editing this file but not by removing the .h from the C list. I don't see the 'downside' as much of a problem - a C header parsed for tags as C++ should look pretty much the same.
Regards, Enrico
P.S.: either my mail client is broken or your mail is sent in a strange way. It has the text in the text/html part but an empty text/plain part which caused me some troubles in getting the quoted text into my answer :(. But it could also be my mail client. At least I thought if a mail is sent with some HTML code, the text/plain part should contain a *plain text* version for those of us who don't like HTML in emails...
Mea culpa. My mail client is Thunderbird and have it set to 'ask before sending' but I've got the bad habit of hitting the 'HTML only' button when it asks. I've now added uvena.de to the 'text only' list so I shouldn't happen again.
Thanks again,
Bob S.