Closed klesun closed 3 years ago
I'm adopting such approach for now. I think in deep-js it works similarly.
2020.12.19.001 - basic preview implemented
There is still some dead code and missing functionality left: some syntax constructs and comments. Will need to eventually migrate them to this new approach that does not rely on updating preview window - will leave this issue open till comments are back in preview window at least.
Comments fixed in e8e3802a9e073545c206e141c9b3abeda3ea2a1d
I relied on a hack of sorts that updated already displayed options by implementing a mutable
LookupElement
. The update is required because showing preview values often takes one exponential step longer than just the keys list.Possible solutions:
LookupElement::getExpensiveRenderer()
and by putting thereThread.sleep(20)
the behaviour becomes similar to how it was, but it works only half of the times.$var = ['a' => 1, 'b' => 2]
) value info available in a non-lazy way and show it instantly