On Wed, May 25, 2011 at 06:29, Matthew Brush mbrush@codebrainz.ca wrote:
Hi,
I started working on support for reading Exuberant Ctags files. The commit message sums up most of the details I hope. If anyone wants to try it out and/or review the code, that would be much appreciated.
The relevant commit is here on my 'ctags-support' branch: https://github.com/codebrainz/geany/commit/a642077c47ea444e9b13b9d2ad244be08...
Or the attached patch has the same information.
I haven't tested a whole lot but it seems to be working well, allowing colourizing of the tags and auto-completion. It doesn't (yet) get the arguments list for functions (haven't found a clean way yet), so the calltips for function tags are pretty useless.
Hi Matthew,
as this is something I wanted to do myself, I really like it! I've been looking at the code only so far; I'll test it once I have access to my computer in the evening. A few comments:
1. In tm_tag.c it would be better to have ctagKinds languageKinds[] separate for each language and then have allKinds array indexed by lang_id containing languageKinds[] of all languages. So to get to language's tags, you would just do allKinds[lang_id] instead of going through the whole list every time. (a dummy entry would be used for lang_id's not present in the table)
2. You can get function parameters from extension fields when you run ctags with --fields=+S (and I believe you get variable type with "t"). Check the man pages of ctags. I think this is safer than using your USE_HACKS code.
3. More general comment - if we have ctags file parsing support, it's a question whether Geany should continue using the old format and its generation. Tags generation would be then redundant in Geany if you can do the same with ctags (and ctags is the right tool to generate tags, not a text editor). Geany's documentation would then just say what flags should be used for ctags in order to create all the necessary fields.
Cheers,
Jiri