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

Enable hover for var @"foo-bar" #1320

Merged
merged 1 commit into from
Jul 16, 2023
Merged

Conversation

FnControlOption
Copy link
Contributor

For example:

var @"foo-bar" = "foo";

const Foobar = struct { @"foo \" bar": i32 };
var foobar = Foobar{ .@"foo \" bar" = 123 };

Warning: Other than that there doesn't seem to be any noticeable slowdown on my potato, I don't know what effect this has on performance... Guidance on how to benchmark this would be much appreciated!

@leecannon
Copy link
Member

Hover works on other but not on @"foo \" bar":

pub fn main() !void {
    var t: Foobar = undefined;
    _ = t.@"foo \" bar";
    _ = t.other;
}

const Foobar = struct {
    /// Test
    @"foo \" bar": i32,

    /// Test
    other: i32,
};

@leecannon leecannon merged commit 8da21e1 into zigtools:master Jul 16, 2023
@FnControlOption FnControlOption deleted the dev branch July 16, 2023 17:22
Techatrix pushed a commit that referenced this pull request Aug 26, 2023
KoltPenny pushed a commit to KoltPenny/zls that referenced this pull request Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants