zls
zls copied to clipboard
automatically collect parameter types of builtins
The config_gen.zig is used during the build phase to collect metadata about Zig's builtins from the Zig Language Reference. This is how we provide code completions for builtin with documentation and snippets.
Despite that, we still manually resolve the parameter types of builtin functions in two different locations:
- https://github.com/zigtools/zls/blob/0863dc80de7bc0075fbd12c0565fccb4256dfb6a/src/analysis.zig#L5629-L5718
- https://github.com/zigtools/zls/blob/0863dc80de7bc0075fbd12c0565fccb4256dfb6a/src/features/completions.zig#L1451
To reduce the maintenance burden, config_gen.zig should be utilized for this task.