Closed alfonsogarciacaro closed 6 years ago
@alfonsogarciacaro Happy New Year to you too!
I think you need to pass the identifier on which you're hovering, like here. Perhaps Monaco can provide the identifier, instead of using the lexer lookup from FSAC, but I have not looked if that's readily available.
Also, there seems to be some tooltip caching in GetToolTipText
(key here), so if that doesn't perform well or is eating too much memory it can be reworked.
Awesome, tooltips are working now! :tada: :tada: Thanks a lot @ncave! :clap: :clap:
This is ready to merge 😄
@MangelMaxime The only thing that's missing now to replace the old REPL should be putting the F# code in the URL so people can share it, right? I guess we need to do the same with the HTML code.
@MangelMaxime Also, I'm getting this error in the Browser console always when loading the REPL. I think it comes from Thot:
Decode.fs:288 Uncaught Error: Expecting an object with a field named `type` but instead got:
{
"source": "react-devtools-detector",
"reactBuildType": "development"
}
at andThen (Decode.fs:288)
at Mouse.fs:43
at args3 (Generator.fs:22)
at curriedFn (Generator.fs:11)
at Mouse.fs:62
Yes that's right. We need to use the urlParser for that.
This is the first step to add tooltips to the REPL. In Fable, I just exposed the
getToolTipAtLocation
function @ncave added some time ago, and here I'm just registering the hover provider. However, the only result I get fromFableREPL.GetToolTipText
is:So I'm afraid I'll need some @ncave magic again here, any ideas?
Happy New Year btw :wink: