The extension is used by both C and C++ and lexing/parsing C headers with the C++ parser causes less problems (identifiers named like C++ keywords get highlighted and tags aren't generated for them) than parsing C++ headers with the C parser (parsing and lexing completely broken). You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/857
-- Commit Summary --
* Treat the "h" extension as a C++ file
-- File Changes --
M data/filetype_extensions.conf (2)
-- Patch Links --
https://github.com/geany/geany/pull/857.patch https://github.com/geany/geany/pull/857.diff
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857
Needs to fix the failing tagmanager tests that depend on the .h extension :)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169822599
Done - it seems I screw up even the simplest patches :-).
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169827463
Just add a comment in News of a possibly breaking change (if its not done now it will be forgotten in the rush to release :)
Nobody will read it, but we have something to point to when they complain :)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169832076
Just add a comment in News [...]
I don't think we should just arbitrarily start imposing this new requirement on PRs. We either should require it for all or none (which is fine too, it's all in the Git log and will be added next release when `NEWS` is updated from it, as usual).
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169838086
:+1: BTW :)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169838183
I don't think we should just arbitrarily start imposing this new requirement on PRs. We either should require it for all or none (which is fine too, it's all in the Git log and will be added next release when NEWS is updated from it, as usual).
I am not "arbitrarily imposing" anything, or intending to create any project wide rule. Since I thought of it its, just a suggestion for this PR to avoid it being forgotten.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169847118
Just add a comment in News of a possibly breaking change [...]
That's telling the pull requester to do something, not suggesting.
I am not "arbitrarily imposing" anything, or intending to create any project wide rule.
Well, you told the pull requester to do something that's not required, which makes it rather arbitrary. I was just saying I don't think we should do that. Apologies if I misunderstood, my English isn't very strong.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169851470
Edit: actually wait, won't this break tags in C files since it doesn't handle C++ tags?
@codebrainz I think I don't understand - what exactly do you mean?
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-169968540
@techee I mean a C file can't see tags/symbols from a C++ file, so if .h is made a C++ filetype, then C files will no longer be able to see tags even from their associated headers. @b4n said on the mailing list "This is a bug in current code that I think Jiří fixed in his scope PR." (I assume #505?)
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-170004922
Yes, more specifically it's the langs_compatible() function here which is used for all searches:
https://github.com/geany/geany/pull/505/files#diff-c5485a65fd9316fd2eecb6a69...
So yeah, maybe it's better to wait for #505 to get merged first.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-170046385
@techee Yeah, we should probably wait, it would be annoying to lose tags from headers in plain C. It's the reason, as mentioned on the mailing list, I had locally made `.c` a C++ extension as well.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-170110920
Just noticed that we should also use the new langs_compatible() from #505 for typename highlighting in symbols_find_typenames_as_string() otherwise we won't get correct highlighting inside C files if the symbol is defined in (C++) h file. Will add the patch once scope completion gets merged.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-172182306
@b4n What about this one for 1.28 as well?
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-224570602
+1
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-224749571
note for myself: has the fixing PR been merged? it's marked as closed, so check needed.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-224750728
note for myself: has the fixing PR been merged? it's marked as closed, so check needed.
I think all the necessary patches - the missing one was this
https://github.com/geany/geany/pull/906/commits/cb307e5b92479ce984aff01b106b...
which is now in.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-224819485
LGTM.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-225302598
Note: the new C and C++ parser in universal-ctags has special header handling for not getting fooled by C++ yet not choke on C headers using C++ keywords.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#issuecomment-225302872
Merged #857.
--- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/857#event-689161631
github-comments@lists.geany.org