The problem with loading all external tags into the wordlists is that the lexers only recognise syntactic elements, in this case "identifier" and not the semantics that it is a typename or a function name. Also they have no knowledge of scope and no way to pass that information to them.

The lexers will select the style of an identifier as the first list it finds the name in, so in C++ for example if the standard library set type was loaded from global tags then the lexers would style all set() functions as types. And set(...) is a pretty common function and they would all show as types. Because of the lack of scoping this happens even if the set type is not visible at the point of the set() function call.

If extra lists for function names were added the fact that the lexers do not have semantics or scope will mean identifiers (eg local variables) that happen to have the same name as a function in any loaded file or tags will be styled as a function name.

Similar clashes will happen in any language with separate namespaces. There is no simple solution to this issue.


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/issues/3848/2067960749@github.com>