Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LS: Hovers show enclosing function when hovering over variable used in a macro #6534

Open
mkaput opened this issue Oct 29, 2024 · 1 comment
Labels
bug Something isn't working ide This issue refers to CairoLS or editor extensions

Comments

@mkaput
Copy link
Contributor

mkaput commented Oct 29, 2024

Empty project, just the following Cairo snippet:

use core::to_byte_array::FormatAsByteArray;

/// Converts a `felt252` to a `base16` (hexadecimal) string without padding, but including the `0x`
/// prefix.
/// We need this because Starknet Foundry has a way of representing addresses and selectors that
/// does not include 0's after `Ox`.
pub fn to_base_16_string_no_padding(value: felt252) -> ByteArray {
    let string = value.format_as_byte_array(16);
    format!("0x{}", str<caret>ing)
}

currently it shows:

Image

while it should not show anything (easier solution) or show proper hover for a variable

another example:
Image

@mkaput mkaput added this to CairoLS Oct 29, 2024
@mkaput mkaput converted this from a draft issue Oct 29, 2024
@mkaput mkaput added ide This issue refers to CairoLS or editor extensions bug Something isn't working labels Oct 29, 2024
@mkaput mkaput moved this from Triage to Backlog in CairoLS Oct 30, 2024
@Arcticae
Copy link
Collaborator

Arcticae commented Nov 7, 2024

(Temporary) Solution:
Display nothing instead of rubbish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ide This issue refers to CairoLS or editor extensions
Projects
Status: Backlog
Development

No branches or pull requests

2 participants