cairo
cairo copied to clipboard
Hovers on identifiers *defining* the item/variable are not working
trafficstars
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:
| Expected | Actual |
|---|---|
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