tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

Fix LSP not showing type signature in untyped code #1889

Closed yannham closed 2 months ago

yannham commented 2 months ago

Most of the time, hovering over a symbol in untyped code would show Dyn even though the symbol has a type annotation - typically for records accessed via a non-trivial path, e.g. foo.bar.baz. This is an issue especially because we don't get to see the right types for stdlib symbols when hovering over them.

Capture d’écran du 2024-04-12 15-58-40

This PR fixes the issue by taking the type annotation (technically one of the aggregated type annotations) instead of the type provided by the typechecker when the latter is Dyn.