[Github-comments] [geany/geany] Enable local variable and function parameter tag reporting for C/C++ (PR #3175)

Thomas Martitz notifications at github.com
Thu Apr 21 12:59:45 UTC 2022


> 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 or view it on GitHub:
https://github.com/geany/geany/pull/3175#issuecomment-1105176389
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3175/c1105176389 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220421/4af9ab76/attachment.htm>


More information about the Github-comments mailing list