Well, we already have the context action (https://geany.org/manual/#context-actions) which can call arbitary commands on the current word. For an example, see https://wiki.geany.org/howtos/pydocw. The script shows a little window with the Pyrhon documentation. In there you could also display any other information from your source.