onflow/cadence-tools

[LS] Convert code to include static types

bluesign opened this issue · 2 comments

Issue To Be Solved

Not sure where this lands, but something like this would be nice

if I have code like below:

var a = "deniz"

some tool converting this to:

var a : String = "deniz"

Extension is showing types, but also would nice to people use this somehow, then we have this on deployed contracts.

I saw this feature in the Swift VS Code extension and in the Rust extension (really, rust-analyzer): It shows inferred types as inlay hints, which we already have, but also provides an action to insert the inlay hint text into the code. See e.g https://stackoverflow.com/questions/72276850/can-vs-code-rust-analyzer-insert-inlay-hints-into-the-code.

We can probably just copy that implementation approach.