Coder Social home page Coder Social logo

Comments (3)

let-def avatar let-def commented on August 18, 2024

a) Merlin tries to guess the context under cursor in different way.
The normal path is if both parsing and typing succeeds normally (code is well-typed), then it will have full information about context (including local scope of expression).

If typing fails, it fallbacks to a "relaxed" typer that accepts type errors but tries to produce as much meaningful information as possible. While already available, some improvements not yet published have been made to further "relax" the typer.

If parsing fails, this is the hard case… Merlin is not able to do anything. Wrt to ocaml compiler, the parser is much more tolerant (it will report errors and tries some heuristic to continue parsing).
But this is not enough, I have some idea about possible improvements, I'll keep you informed about that.

b) Even if those information are available inside merlin process, they are not made available to the editor. I am not sure how to present these information to the end-user.

from merlin.

roshanjames avatar roshanjames commented on August 18, 2024

Thanks for the explanation.

About (b): I was thinking that one could ask auto-complete to say display the usual auto-complete with M-/ (or C-TAB as you have in the default bindings) and then then hitting some other key will show only the completion candidates that match the context type.

from merlin.

let-def avatar let-def commented on August 18, 2024

Implemented some time ago.

from merlin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.