I probably wasn't clear enough here but this is about local variables only and there's no change for other tag types. I think for variables declared inside functions it's safe to say that those declared after the current line are not usable.
This may be true for well-written, valid code. But we deal with code that's just being written, and in that case it can absolutely be useful to autocomplete later declarations, perhaps knowing that I need to move the declaration upwards after finishing this line.
I don't think we apply that logic to global tags like static variables, do we? Like, I can autocomplete a call to foo()
even if its declaration is later in the file?
I'm not saying the "only tags declared before the cursor" is right or wrong, but that it's not so clear as you might think.
I would probably remove that logic from the patches for now and see what the feedback is.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.