Extended LSP Support

Improved Support for IDE Users

I’m excited to share that ZubanLS now supports a much broader set of Language Server Protocol features.

ZubanLS 0.0.18 now supports a much broader set of LSP features. In addition to diagnostics, it can provide completions, go-to functionality (for definitions, declarations, implementations, and type definitions), hover information, references, document highlights, and even renaming. This brings ZubanLS much closer to the experience you would expect from a fully featured language server, with only some smaller pieces such as call signatures and semantic tokens still on the roadmap.

Untyped Return Inference

On top of that, zuban check now includes type inference for untyped return types.

Untyped return type inference is especially useful when working with code that doesn’t have explicit type annotations. It allows ZubanLS to infer a reasonable return type based on the function body, so functions like def foo(x): return [x] no longer appear as returning Any but instead as list[T]. This greatly improves type safety, since downstream code can be type-checked more precisely, while still keeping the flexibility of writing unannotated code. It also makes completions, hover information, and error reporting more accurate in untyped codebases.

ZubanLS

David Halter

Founder