Comments (5)
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)
withlen
should suggestData.Array.length
first (possibly not even showlength
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.
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.
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 rankData.List
aboveData.List.Lazy
.
from purescript-language-server.
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.
Implemented in #15. Please raise any additional heuristics as a new issue
from purescript-language-server.
Related Issues (20)
- Support configuring spago file/target
- Neovim configuration HOT 6
- BUG: Deleting/renaming modules does NOT purge them from the cache HOT 3
- Support completion for qualified do imports
- Docs: Update formatter section HOT 1
- Organizeing imports deletes comments HOT 1
- Hover (show documentation) does not work with recent coc.nvim HOT 8
- Suggestion: Extend diagnostics on type to buffer switches HOT 1
- Support multiple spans per diagnostic
- Incorrect "Go to definition" behavior for the `Bind` data type.
- E715: Dictionary required when trying to apply sourse.sortImports code action HOT 2
- Breakpoints?
- Use with spaghetto (spago@next)
- amazing stuff; just wondering if it supports eval? like in -- >> HOT 1
- Warning/Error reporting not working? HOT 5
- Action to export HOT 1
- Find references returns no references HOT 1
- Should optional field return null? HOT 1
- Stale errors/warnings stick around after a full build
- Presence of VTA prevents LSP functionality
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from purescript-language-server.