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

provide completions for creating std_options #1688

Closed
xdBronch opened this issue Dec 29, 2023 · 5 comments
Closed

provide completions for creating std_options #1688

xdBronch opened this issue Dec 29, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@xdBronch
Copy link
Contributor

im not sure if this is easily done without cluttering general completions but it would be great if for example this

const std = @import("std");

pub const std_options = struct {
    pub const enable_se<cursor>
};

pub fn main() !void {}

gave a completion for enable_segfault_handler (maybe a type hint in the completion too? not sure how thatd work)
can zls detect if its in the root file? thats the only time std_options are valid

@xdBronch xdBronch added the enhancement New feature or request label Dec 29, 2023
@xdBronch
Copy link
Contributor Author

xdBronch commented Jan 3, 2024

this kinda becomes moot once ziglang/zig#14432 is implemented

@InKryption
Copy link
Contributor

this kinda becomes moot once ziglang/zig#14432 is implemented

That isn't an accepted proposal, so wouldn't be too hasty to rely on it.

@xdBronch
Copy link
Contributor Author

xdBronch commented Jan 3, 2024

well it's certainly marked as accepted
I'm guessing you're referring to andrews comment about what vexu so I get what you mean. I'd still like this feature, just wanted to point out that it will likely not be needed eventually

@nektro
Copy link
Contributor

nektro commented Jan 3, 2024

it's accepted but there's no current accepted way to implement it. there's some showstopping issues with making it a struct instance that make it unlikely to make it in

@xdBronch
Copy link
Contributor Author

xdBronch commented Feb 9, 2024

its merged now so not really any point to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants