Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[C, C++] Calltips have missing space after comma for parameters #3474

Open
ntrel opened this issue Apr 27, 2023 · 8 comments
Open

[C, C++] Calltips have missing space after comma for parameters #3474

ntrel opened this issue Apr 27, 2023 · 8 comments

Comments

@ntrel
Copy link
Member

ntrel commented Apr 27, 2023

This makes it harder to read the signatures. Not sure when it was introduced.
Weirdly C# and D don't have this problem, even though they use the same ctags/parsers/geany_c.c tag parser file as C and C++.

@elextr
Copy link
Member

elextr commented Apr 27, 2023

even though they use the same ctags/parsers/geany_c.c tag parser file as C and C++.

No actually, C and C++ use the parser in the cxx subdirectory, the legacy parsers in geany_c.c have Old on their names so they are not picked up.

@ntrel
Copy link
Member Author

ntrel commented Apr 28, 2023

Oh OK, thanks (#3032). So looks like C#, D and Java could be changed to the c-based.c parsers from ctags.

@ntrel
Copy link
Member Author

ntrel commented Apr 28, 2023

BTW I was looking with meld if there were any upstream ctags changes that might fix this. I found 2 but they don't affect this:

  • A typo in cxxTokenCopy that wasn't setting bFollowedBySpace
  • Some changes in cxxTokenChainSplitOnComma setting bFollowedBySpace

@elextr
Copy link
Member

elextr commented Apr 28, 2023

So looks like C#, D and Java could be changed to the c-based.c parsers from ctags.

c-based.c looks at first glance to be very similar to geany_c.c without C, C++, Vera, or Vala, just C# D and Java, though there may be detail differences.

I guess both originated from the same ctags c.c and diverged during the ctags unmaintained period, then uctags removed C and C++ when the new parser came online. Somebody needs to check that c-based.c contains at least the capability that geany_c.c has, since it gathered changes during the divergence, then they can be synchronised (Vala being the most obvious addition to geany_c.c, and uctags Vera is now its own vera.c) .

IIRC @techee found what he thought were improvements in geany_c.c that are not in upstream (and vice versa). Just needs "somebody" to do it.

@ntrel
Copy link
Member Author

ntrel commented Apr 28, 2023

A typo in cxxTokenCopy that wasn't setting bFollowedBySpace

#3478

@ntrel
Copy link
Member Author

ntrel commented Apr 28, 2023

Somebody needs to check that c-based.c contains at least the capability that geany_c.c has, since it gathered changes during the divergence, since it gathered changes during the divergence, then they can be synchronised

Yeah, though sending the changes upstream could be a big job due to divergence. I'm looking at the D changes and I expect we should switch to ctags even if it means losing features, because their parser is likely better and my Geany D changes were often hacks. Any important ones I will try to port to ctags.

@techee
Copy link
Member

techee commented Apr 28, 2023

Calltips have missing space after comma for parameters

Yeah, I've noticed that too after switching to the new parser. Does #3478 fix that problem? If so, it should be submitted to universal-ctags first and if it gets merged, we could then port it to Geany.

Oh OK, thanks (#3032). So looks like C#, D and Java could be changed to the c-based.c parsers from ctags.

See universal-ctags/ctags#3327 - my plan was to remove the C/C++ parser in Geany's c.c but I didn't get to it yet. Since most of the ugly code is related to C/C++, the result should then be easier to compare and unify. Note that we also have to switch to cpreprocessor.c/h from lcpp.c/h that Geany's c.c uses. This will be quite complicated for collecting function parameters because uctags does it differently, not at the preprocessor level like Geany and the output isn't as good as with Geany's c.c.

@ntrel
Copy link
Member Author

ntrel commented May 3, 2023

Does #3478 fix that problem? If so, it should be submitted to universal-ctags first and if it gets merged

No. And it's from universal-ctags :-)

Thanks for the info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants