Hi all,
I have a couple of questions about tags, maybe one of you could shed some light on me:
1) The documentation states there is a default LaTeX global tags file which I don't see either in my installation or in the repo. Was it removed from geany?
2) I don't fully understand the relationship between tag management in geany and ctags. I see geany includes it's own copy of ctags source. But: i) does it honour my ctags user configuration? (for example, I've written custom rules for the R language); ii) if it does, will it be only for global tags or also for the loaded files tags?
Best regards -- Carlos
Le 18/11/2013 14:44, Carlos Pita a écrit :
[...]
- I don't fully understand the relationship between tag management
in geany and ctags. I see geany includes it's own copy of ctags source.
Geany embeds a copy of CTags that it uses as a library (and not external program). Our copy has been patched over the years to fix and improve parsers, as CTags used not to be really responsive on patches.
But: i) does it honour my ctags user configuration? (for example, I've written custom rules for the R language);
I don't think so, but I'm not 100% positive. I'm sure Geany won't recognize a new language added like this, but I'm not 100% sure you couldn't add more rules to an existing language. I don't know that part of CTags much.
All this said, since quite recently Geany is able to load vanilla CTags global tags files, so you could generate those using CTags and load them in Geany. But it won't affect in-Geany parsing (e.g. symbol list and new tags).
Regards, Colomban
Thank you for your prompt answer.
I don't think so, but I'm not 100% positive. I'm sure Geany won't recognize a new language added like this, but I'm not 100% sure you
Can anyone else confirm this? IMO this is an important point from the extensibility perspective. If a language is not supported out of the box you need to be able to configure both geany workhorses: scintilla and, in this case, ctags.
All this said, since quite recently Geany is able to load vanilla CTags global tags files, so you could generate those using CTags and load them
I've read about this in the mailing list but by reading the documentation it still isn't clear enough for me how to do that, everything there refers to the -g cli option.
Best regards -- Carlos
I don't think so, but I'm not 100% positive. I'm sure Geany won't recognize a new language added like this, but I'm not 100% sure you
Can anyone else confirm this? IMO this is an important point from the extensibility perspective. If a language is not supported out of the box you need to be able to configure both geany workhorses: scintilla and, in this case, ctags.
Or maybe ctags configuration could be done at the geany language level (filetypes.*) instead of at the system user level (~/.ctags). That seems the correct way to do it but also looks harder to implement. I don't know how difficult it is to initialize the embedded ctags with specific options or to instruct it to load some initialization file at startup.
I see that option reading and initializing was removed from tagmanager/ctags/options.c:
#define readOptionConfiguration #define initOptions #define freeOptionResources
I assume there are good reasons for this, but would it be too difficult to make the embedded ctags read ~/.ctags? Would it take a lot more effort than more or less copy&pasting some code from the official ctags?
I understand one can just write a C extension for ctags, even one only relying on regexs the same as would be done in ~/.ctags, which is not that hard, but it would be nice to avoid geany recompilation for simple tasks.
Any advice will be very much appreciated.
On Mon, Nov 18, 2013 at 11:25 AM, Carlos Pita carlosjosepita@gmail.com wrote:
I don't think so, but I'm not 100% positive. I'm sure Geany won't recognize a new language added like this, but I'm not 100% sure you
Can anyone else confirm this? IMO this is an important point from the extensibility perspective. If a language is not supported out of the box you need to be able to configure both geany workhorses: scintilla and, in this case, ctags.
Or maybe ctags configuration could be done at the geany language level (filetypes.*) instead of at the system user level (~/.ctags). That seems the correct way to do it but also looks harder to implement. I don't know how difficult it is to initialize the embedded ctags with specific options or to instruct it to load some initialization file at startup.
On 19 November 2013 06:48, Carlos Pita carlosjosepita@gmail.com wrote:
I see that option reading and initializing was removed from tagmanager/ctags/options.c:
#define readOptionConfiguration #define initOptions #define freeOptionResources
I assume there are good reasons for this, but would it be too difficult to make the embedded ctags read ~/.ctags? Would it take a lot more effort than more or less copy&pasting some code from the official ctags?
I understand one can just write a C extension for ctags, even one only relying on regexs the same as would be done in ~/.ctags, which is not that hard, but it would be nice to avoid geany recompilation for simple tasks.
Currently there is no way to define new parsers without re-compiling and no way of assigning them to filetypes without re-compiling. So to allow configurable parsers you would need to add that capability first.
It would be less work to compile in your new filetype and add the capability to load the regexen to it.
Note that the current R parser has the (compile time) option to use the regex parser, but it defaults to a coded one. Don't know why or whats the difference. But even if it used the regex one it would not load options, you would have to add that.
On using regex parsers, note that by default the parser runs every 250ms when you are making changes to a file, don't make your regexes too complex (or get a faster machine I guess).
Cheers Lex
Any advice will be very much appreciated.
On Mon, Nov 18, 2013 at 11:25 AM, Carlos Pita carlosjosepita@gmail.com wrote:
I don't think so, but I'm not 100% positive. I'm sure Geany won't recognize a new language added like this, but I'm not 100% sure you
Can anyone else confirm this? IMO this is an important point from the extensibility perspective. If a language is not supported out of the box you need to be able to configure both geany workhorses: scintilla and, in this case, ctags.
Or maybe ctags configuration could be done at the geany language level (filetypes.*) instead of at the system user level (~/.ctags). That seems the correct way to do it but also looks harder to implement. I don't know how difficult it is to initialize the embedded ctags with specific options or to instruct it to load some initialization file at startup.
Users mailing list Users@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/users