Seperate function from args is quite offen in zig’s to-come 0.16. But in a way like format print that passing args with a comptime flexible tuple. I worry that it would be inconvient without automatic completion.
And it is feasible to make special support for std.Io in lsp(zls). But if some one else make a tool/lib that uses seperated function and args, he would not enjoy that benefit.
I wonder if there is any plan to optimise it or some existing ways?
Btw, I dont know between help and brain storm which category is this topic suitable for.
If I understand your question/concern correctly, it’s about e.g. io.async(myFunction, .{ 123, .abc }) and ZLS not providing information or completions for the arguments. ZLS is a third-party project, so the best place to raise concerns about this is probably in the ZLS repo or in one of the spaces linked to from their website.
However, be aware that ZLS is intentionally very restrictive with regard to how much it tries to evaluate at comptime before bailing out. It used to have a proof-of-concept comptime interpreter but it was removed because it would be too much effort to maintain.
Officially, the long-term idea is to have the Zig compiler provide some sort of protocol for communicating information about compilation, including things like comptime evaluation results:
The good news is that calling io.async or io.concurent is not going to be that common in code. Most code will just deal with readers, writers, queues, etc. Spawning a new task is done rarely and in specialized code. Even Thread spawning in 0.15 doesn’t have custom zls support, and people manage.