-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Completion doesn't find local bindings #50
Comments
|
That might be dangerous (theres some properly weird stuff going on in translmod around setvalue/getvalue). It shouldn't be too hard to interpret the output of parsing and maintain our own table. One thing I have been wondering about is whether it is possible to use utop (as a library) to control the top level. It tends to follow the ocaml compiler releases and features a bit better than iocaml (ie I would love to have ppx in iocaml, but it doesnt work at the moment). |
(great minds and all that!) |
:D yup. it would require forking utop (it doesn't currently expose all we would want it to), unless we pretend to be emacs and connect to utop over a socket |
How come you've decided to use utop rather than merlin? merlin also has a completion API and its already available for general use through its RPC. |
merlin has a completion api that works with a running repl context? this isn't just for statically analyzable completions, this is for a repl |
I see. I did not appreciate this difference at first. Isn't an ipython notebook In any case, @let-def could you please comment on this? On 08/22, Jared Forsyth wrote:
|
In its current state Merlin is not compatible with a REPL because of the patches applied on compiler-libs. We are looking into making it usable for a REPL, that should happen early 2017 and will probably be exposed as a library to use on top of compiler-libs. |
@rgrinberg ipython is a true repl, with a live context that you can interact with and manipulate. though you're right that you could probably figure everything out statically, utop was built for the kind of interaction that people expect from ipython |
@let-def any update with the Merlin then? |
I didn't implement anything directly on Merlin side yet, but @SanderSpies extracted relevant code and made a proof of concept 👍 . |
If I define
let something
, and then execute it, I would expect that typingsom<tab>
would autocomplete tosomething
It looks like you'd need access to
toplevel_value_bindings
, which is private :(Would we be able to just grab the
toploop.ml
file and copy it into this project?The text was updated successfully, but these errors were encountered: