Edit: also just to point out, nobody using C++ writes this-> so member names are not scope autocompletes.

Apart from that, this isn't recognized or handled by scope autocompletion in any way right now.

My worry is that all of Geany's headers (except sidebar.h) are penalized when editing sidebar.c and I have no reason to assume that I want sidebar.h symbols more than other Geany symbols (might even be that the opposite is true, not sure).

Since tags from the current file are already placed above other symbols, you won't see much difference because symbols.h (assuming you are editing symbols.c) just contains declarations of the functions from symbols.c which are already placed above. However in C++ headers also contain members which are not declared in the source files and members are accessed frequently in C++ code and you want non-scope autocompletion for these more often than some random members from other header files.

Also note that the "penalization" already happens, it's just in the form of alphabetic ordering and more or less random in terms of what would be useful for the user. For instance, when you have symbols ga, gb, and gz in your project declared in some header files and for simplification we assume that all gtk symbols start with the gtk_ prefix, after typing g without this PR you get an autocompletion popup containing

ga
gb
gtk_...
gtk_...

Here, ga and gb "won" and gtk symbols were penailized, and gz was just killed by the amount of gtk symbols and has no chance to even appear in the list. After this PR, assuming the current file includes the headers containing these symbols, you get

ga
gb
gz
gtk_...
gtk_...

GTK gets penalized but to get the symbol you want, you'll have to type much longer prefix anyway so it isn't a problem.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3269/c1233461190@github.com>