You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I took a look at possibility to expose types in worksheets and before starting a work I would like to get opinion what is your point of view on that.
For all the worksheet evaluation responsible is dependency mdoc.
We simply call val worksheet = mdoc.evaluateWorksheet(input.path, input.value)
All logic what to display is handled by mdoc, we only get String as summary of each evaluated line.
Currently we get output:
Just tried quick hack to see if we have any types available during evaluation and as PoC it looks like that:
Changes should mostly be done in mdoc in how it generates a summary for each line.
To not change any current behaviour I thought we could add mdoc.evaluateWorksheetWithTypes to interface which will add types to output in a format we will be happy with.
About how to know when to execute evaluateWorksheet and when evaluateWorksheetWithType I thought we could use lenses for that.
Inspired by dottyIDE:
We could have on top a lens "Show Types" that would be changed to "Hide Types" and back when you click it.
We could keep Map[worksheet_path, show_types] in Metals and based on that decide if user wants to see types or not.
Opinions? :)
The text was updated successfully, but these errors were encountered:
Changes should mostly be done in mdoc in how it generates a summary for each line. To not change any current behaviour I thought we could add mdoc.evaluateWorksheetWithTypes
We could have on top a lens "Show Types" that would be changed to "Hide Types" and back when you click it.
I think that's a good idea if we want to make this functionality configurable. Do we have evidence to support that we don't want this feature enabled by default without an option to hide types? Users who want to see the full runtime value can always hover over the statement (or use shortcut to trigger hover).
Just tried quick hack to see if we have any types available during evaluation and as PoC it looks like that:
nit: I would use Map[Int, String] = <value> as a prefix instead of Map[Int, String: <value> since the colon is always used before the type in Scala.
I took a look at possibility to expose types in worksheets and before starting a work I would like to get opinion what is your point of view on that.
For all the worksheet evaluation responsible is dependency
mdoc
.We simply call
val worksheet = mdoc.evaluateWorksheet(input.path, input.value)
All logic what to display is handled by mdoc, we only get
String
as summary of each evaluated line.Currently we get output:

Just tried quick hack to see if we have any types available during evaluation and as PoC it looks like that:

Changes should mostly be done in

mdoc
in how it generates a summary for each line.To not change any current behaviour I thought we could add
mdoc.evaluateWorksheetWithTypes
to interface which will add types to output in a format we will be happy with.About how to know when to execute
evaluateWorksheet
and whenevaluateWorksheetWithType
I thought we could use lenses for that.Inspired by dottyIDE:
We could have on top a lens "Show Types" that would be changed to "Hide Types" and back when you click it.
We could keep Map[worksheet_path, show_types] in Metals and based on that decide if user wants to see types or not.
Opinions? :)
The text was updated successfully, but these errors were encountered: