fable-compiler / repl-legacy

http://fable.io/repl
MIT License
14 stars 10 forks source link

Integration with Monaco #3

Closed alfonsogarciacaro closed 6 years ago

alfonsogarciacaro commented 6 years ago

Sorry, @ncave, what's the status of this repo? I see there're some files taken from ionide-web, but they still seem to rely on communication with an independent FSharpAutoComplete process (running on .NET) to get autocompletion information, etc

IIRC you told me once you made the FSAC parts needed to make everything runnable in the browser compilable by Fable. Is this somewhere? Or can the information (e.g. CompletionResult) be obtained directly from FSC?

UPDATE: Looking at FSAC code, it seems it's just a thin layer on top of FCS to provide a CLI or HTTP (with the Suave server) API. So I guess I can answer myself that yes, the information can be retrieved directly from FCS :wink:

ncave commented 6 years ago

@alfonsogarciacaro The status is unchanged (with the exception of updating the Monaco bindings to latest). Some FCS features have been available for integration for quite a long time (e.g. here). It should be relatively easy to make some initial progress with basic functionality, if one has the time. Let me know if additional FCS features are needed.

alfonsogarciacaro commented 6 years ago

OMG, this is working!!! (sort of)

image

The only problem is I'm getting too many completion results. @ncave do you have any idea how to restrict them? The most relevant parts of the code are the editor completion request and the FCS helper (the latter is basically what you had, looks like some of the parameters need to be more specific).

BTW, there's something I need to fix in Fable to make this work, I'll push it now.

ncave commented 6 years ago

@alfonsogarciacaro Looking in FSAC, you can pass a filter (either StartsWith or Contains) to narrow down declarations based on residue. You can also pass a flag to add keywords to the autocomplete list.

alfonsogarciacaro commented 6 years ago

TOTAL AWESOMENESS!!!

image

image

StachuDotNet commented 6 years ago

Woah. Keep going!! :)

On Sep 16, 2017 9:33 AM, "Alfonso Garcia-Caro" notifications@github.com wrote:

TOTAL AWESOMENESS!!!

[image: image] https://user-images.githubusercontent.com/8275461/30512631-3fb278cc-9af4-11e7-9d20-6f22c4149301.png

[image: image] https://user-images.githubusercontent.com/8275461/30512643-6a085dbc-9af4-11e7-9556-7e6de7887b2a.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/fable-compiler/fable-repl/issues/3#issuecomment-329968711, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3VvtCbS0CMD51uOZu37mzN-P2jZsAyks5si845gaJpZM4PYRzL .

alfonsogarciacaro commented 6 years ago

@StachuDotNet You didn't see this, this is top secret :wink: