[Geany] Detecting symbols

Enrico Tröger enrico.troeger at xxxxx
Mon May 18 17:13:44 UTC 2009


On Sun, 17 May 2009 23:29:26 +0200, Filip wrote:

>Hi!
>
>I have a feature request, that would make my life so much simpler. I
>am Python coder and I use geany all the time to code in it - both at
>work and for personal projects.
>
>So: right now geany detects some symbols, that are defined in open
>files and suggests them, when you type the beggining of a symbol.
>Could Geany also do the following: check imports at the beggining of a
>file and use them in suggestions? This would be very cool, as I am
>using always named imports (and they are recommended) and thanks to
>this, I would get names of objects, even though I don't have files
>with definitions opened. This especially useful for third party
>libraries - I ain't going to open files from /usr/lib just to get
>suggestions, but this way I will still get them.

This was already requested a couple of times. I'm not sure whether we
want this. It would probably require quite some effort to parse import
statements from an opened source file, find the corresponding Python
files, parse them, merge the parsed information into tagmanager(the
code which provides the main part of symbol completion data).
Additionally, added symbols should maybe removed again when the source
file is closed which also might not be that trivial.

And after all as always, the code still has to be written.

Another, more manual way could be to create a global tags file yourself
from these Python libs you usually use.
General information about globals tags and how to use them can be found
on http://geany.org/manual/#global-tags.
For creating your custom Python tags files, you could use
http://geany.svn.sourceforge.net/viewvc/geany/trunk/scripts/create_py_tags.py?revision=3465&view=markup
as an inspiration on how to create one.


>Furthermore, there is one more thing, that I once noted on this list,
>but wasn't addressed. Let's take following examples: there is symbol
>SomeClassWithLongName and I have already typed WithLongName. If I
>start typing Some right before WithLongName and I get the following:
>
>SomeWithLongName
>
>I'll get a completion suggestion, which I will choose. But then it
>will turn into SomeClassWithLongNameWithLongName. Is it possible for
>geany to be smarter and simple add Class and nothing else?

Sure, but as usual it needs someone to write the code.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20090518/6fff50ab/attachment.pgp>


More information about the Users mailing list