Giter VIP home page Giter VIP logo

Comments (4)

nwolverson avatar nwolverson commented on July 29, 2024

There is currently a bunch of scoring done to order these completions, but mostly around the name of the prefix & module chosen, so Something.Foo should actually appear very near the top of the list if you complete Foo.view (because Foo matches a component of the module name).

If I gather correctly you're suggesting sorting modules that are already imported unqualified (e.g. import Something.Foo (bar)) higher? That seems reasonable but I couldn't say for sure if it's feasible without checking.

from vscode-ide-purescript.

thought2 avatar thought2 commented on July 29, 2024

Oh wow, now I tried this again and realized that it works exactly how you say for my simplified example.
In my case I was importing a value 'view' from module App.UI.Slider but I wanted it qaulified as UI.Slider.view which would result in the import
import App.UI.Slider as UI.Slider

And in this case if i write "UI.Slider.view" (nothing is imported at this point) I am not seeing App.UI.Slider listed near the top.

This way of importing qualified as a name that contains a dot itself was maybe not considered in the matching function? If you point me to the responsible code section, I can see if I can provide a fix.

from vscode-ide-purescript.

thought2 avatar thought2 commented on July 29, 2024

But for now I will just import as UISlider and I'm good :)

from vscode-ide-purescript.

nwolverson avatar nwolverson commented on July 29, 2024

Right, I have come across similar cases where we could do better relating the qualifier.

The suggestion ranking is around here in the language server: https://github.com/nwolverson/purescript-language-server/blob/main/src/LanguageServer/IdePurescript/Completion.purs#L200

from vscode-ide-purescript.

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.