[Geany] CTAGS and C++

Enrico Tröger enrico.troeger at xxxxx
Fri Mar 27 15:01:09 UTC 2009


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++.


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...

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090327/3432f6af/attachment.pgp>


More information about the Users mailing list