Open mkaput opened 1 week ago
Hello Marek,
I'm a software developer and a student at Universidad Cenfotec. I have experience working with various technologies, including Angular for frontend development, Springboot for backend development, and MySQL for database management. Additionally, I have a strong interest in blockchain technology and have been eager to apply my knowledge in the Web3 space.
I'm interested in contributing to the Cairo project and would like to help with issue #5826. Could you provide more details on the current status and any guidelines for contributing?
Looking forward to collaborating.
Hello!
The issue is still open for taking :) I can assign it to you.
As I said, the implementation should extend the snippet provided in issue description. What I imagine, is that that find_definition(...)?
call is replaced with match find_definition(...)
, and in the None
case, an extra check is added that:
.name()
is the same identifier as the one we have on the input.LookupItemId
and checks .name()
equality as described.
Summary
When hovering over identifiers which define items/variables, user expects to get the same hover information as one produced when hovering over identifiers which reference these elements.
See examples:
Proposed solution
This logic only looks for references and completely ignores cases when the identifier under the cursor is actual name of the item/variable. Such condition should be added to this code:
https://github.com/starkware-libs/cairo/blob/4646ad819521338ccd92b8ebef76b96770b46ce1/crates/cairo-lang-language-server/src/lang/inspect/defs.rs#L40-L46