cameron-martin / bazel-lsp

A language server implementation for Bazel
Apache License 2.0
41 stars 2 forks source link

Add type information to builtins #11

Open cameron-martin opened 8 months ago

cameron-martin commented 8 months ago

8 added autocomplete to builtins but typed everything as any. We can do better than this since there's a bunch of type information in the protobuf.

cameron-martin commented 8 months ago

It isn't that obvious to me how to construct non-primitive values of starlark::typing::Ty.

It looks like the only option is to use Ty::starlark_value, which would require generating instances of StarlarkValue from the protobuf.