[Geany-devel] Scope completion fix/reimplementation

Lex Trotman elextr at xxxxx
Sat Mar 24 09:45:20 UTC 2012


On 24 March 2012 12:09, Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> Hi guys,
>
> I re-implemented scope completion some time ago and it seems to work
> quite OK, at least far better than the current TM stuff that seem to
> provide random results -- when it provides some.
>
> I already posted the patch in the "C++ Symbols problem", but it's here
> again, since I want you to take a look at it.
>
> So.  I'm wondering if you have some comments and/or options on the
> patch, and if you think that I should commit it as at least an interim
> solution until we get some working replacement for TM [1].
>
> Known issues (they were already present in previous implementation BTW):
>
>  * "::" triggers the same as "->" or ".", e.g. it fetches completions
> for a variable name, not a class name.  This should be quite easy to fix
> (if we can assume "::" always completes a type name).
>
>  * Currently only a single word is used to get the scope.  E.g., if
> typing "foo.bar.baz", only "baz" is used to find what the user wants to
> complete.  This works completely fine if there is only possible
> candidate for "baz", but if there are multiple candidates, using the
> previous scoping could help to find out which one is the right one.
>   Normally the attached implementation does a fair job at guessing what
> is the right thing to complete, but it still can't read your mind --
> that could even be blank, sigh.
>
>  * We only parse global variables in many languages, so scope completion
> for local variables will probably not work -- though it works for
> sub-members, like "local.member.foo".
>

Just for everyone's information I've been using the patch for several
days in C++ and Python with no noticable negative effects, but since
most of my use falls into the known issues list I don't see much
improvement either.

Cheers
Lex



More information about the Devel mailing list