Hi. I am using Geany as my editor for Basic for microcontrollers. I would like to customize the symbols list in the leftmost column, to include other than those provided through the FreeBasic extension. Apologies if the info exist, but I need to find out please how to do the said customisation. The info in the manual does not seem to explain the process. For example: The Basic files I have use the keyword "include" which add the contents of another file. I would like to have that filename shown in the symbols list, under its own heading, and open the file when clicked
This relates to basic Geany capability, not a plugin.
To have symbols recognised they need to be recognised by the ctags parser, but I doubt it considers an include a symbol, its not a name in the program.
You would have to modify the ctags parser to do it, note its a separate project from Geany [here](https://github.com/universal-ctags/ctags).
Making an include symbol clickable to open the file would then be functionality added in Geany, but somebodys gotta code it.
You are aware that in the edit window you can select the include filename and <ctrl>+<shift>+o to open it as a workaround?
To have symbols recognised they need to be recognised by the ctags parser, but I doubt it considers an include a symbol, its not a name in the program.
Some parsers do that I believe, just because it's sometimes convenient to see which includes this file has. It however indeed doesn't make perfect sense in languages where this kind of directive don't also declare a symbol (like C, C++ and all those languages where it merely means "grab that file"), whereas it makes a lot of sense for languages where it declares a kind of namespace (e.g. Python's imports). Anyway, listing include files wouldn't be a problem I think.
Making an include symbol clickable to open the file would then be functionality added in Geany, but somebodys gotta code it.
This is a lot trickier, because in most languages this relies on possibly unknown search paths. It's easy when you have the full path (either relative to the current file or plain absolute), but otherwise it depends a lot on the language and compiler options Geany might not have the slightest knowledge about. Maybe a plugin could actually do that and hook up on the [GtkTreeView](https://developer.gnome.org/gtk3/stable/GtkTreeView.html)%27s [`::row-activated` signal](https://developer.gnome.org/gtk3/stable/GtkTreeView.html#GtkTreeView-row-act...) of the symbols list and do whatever it pleases there. I didn't test, but that might be doable and so it could have any highly-specific logic it wants.
IIUC in freebasic `include` is a preprocessor "just like C" :grinning:
And yeah it has the `-i` search path problem too https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgInclude.
github-comments@lists.geany.org