Giter Club home page Giter Club logo

Comments (5)

nwolverson avatar nwolverson commented on July 21, 2024

The 2nd point, are you suggesting a heuristic based on matching the last segment of the module name? Looks like this also applies to point 1

We (I) also discussed:

Rank by already-imported idnetifier

  • import Data.Array (length) with len should suggest Data.Array.length first (possibly not even show length from incompatible modules but that's a separate issue)

(It may make sense to split this issue depending on what's implemented but lets keep ranking suggestions here until the first iteration is released)

from purescript-language-server.

kritzcreek avatar kritzcreek commented on July 21, 2024

If you implement this, it would be nice if you could write down the rules you're following so we could consider implementing them in purs ide.

from purescript-language-server.

natefaubion avatar natefaubion commented on July 21, 2024

Sorry, yes that's two rules specifically around autocomplete with an unimported qualified identifier. It should consider the name when ranking results. So, the heuristic is basically

  • If there's already a type imported with the same name, it should always rank that module first
  • Otherwise it should consider namespace segments to find a likely fit. Probably something like segment match and hierarchy, so List would probably rank Data.List above Data.List.Lazy.

from purescript-language-server.

natefaubion avatar natefaubion commented on July 21, 2024

Another way to rank would be to infer if we are likely in a type declaration and provide type suggestions first instead of constructors. Additionally, if we've already imported a type, it should also let us import the constructors after the fact. I'm not sure if this is a psc-ide bug though.

from purescript-language-server.

nwolverson avatar nwolverson commented on July 21, 2024

Implemented in #15. Please raise any additional heuristics as a new issue

from purescript-language-server.

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.