Skip to content
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

Design the Searcher (Autocomplete) #713

Closed
4 tasks
iamrecursion opened this issue Jan 22, 2020 · 0 comments
Closed
4 tasks

Design the Searcher (Autocomplete) #713

iamrecursion opened this issue Jan 22, 2020 · 0 comments
Assignees
Labels
--breaking Important: a change that will break a public API or user-facing behaviour -tooling Category: tooling p-medium Should be completed in the next few sprints w-docs Website: Documentation

Comments

@iamrecursion
Copy link
Contributor

Summary

One of the key pillars of Enso Studio's usability is the intelligent nature of its searcher. The searcher can be thought of as autocomplete on steroids. It takes into account obvious things like the location in code and the contextual type, but also more user-focused things such as unimported symbols, searching within documentation, and so on.

Value

We will be able to provide well-ranked candidate completions to Enso Studio for use in the searcher.

Specification

The design for the searcher should be coherent with the needs to operate within the LSP Completion functionality. We can also consider applying elements of the work-in-progress LSIF specification to help provide rapid completions while the language server spools up.

  • Design the user experience for the node searcher.
  • Determine the criteria for gathering completions. This is primarily a question of where.
  • Determine the criteria for ranking completions. Examples follow.
    • Hints should be scored on a type match. For example, if we have a type 5, foo : 5 -> String scores higher than bar : Nat -> Dynamic, scores higher than baz : Any -> Any. This should be done by heuristics initially, and later by querying the typechecker for subsumption relationships (the notion of specificity discussed in the types design document).
    • Information contained in the tags section of the documentation should also be used to rank candidates.
    • Please note that this ranking algorithm will be required to get more complex in the future, so please design it for extensibility and high performance.
    • Local variables should rank higher than global symbols.
  • Record these design decisions in the relevant design document.

Acceptance Criteria & Test Cases

  • The searcher design has been established and written down concretely.
@iamrecursion iamrecursion assigned 4e6 and unassigned lolczak May 7, 2020
@4e6 4e6 closed this as completed Jun 10, 2020
@iamrecursion iamrecursion transferred this issue from another repository Jun 23, 2020
@joenash joenash added w-docs Website: Documentation -tooling Category: tooling --breaking Important: a change that will break a public API or user-facing behaviour Difficulty: Core Contributor p-medium Should be completed in the next few sprints labels Jun 23, 2020
@iamrecursion iamrecursion mentioned this issue Jun 30, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--breaking Important: a change that will break a public API or user-facing behaviour -tooling Category: tooling p-medium Should be completed in the next few sprints w-docs Website: Documentation
Projects
None yet
Development

No branches or pull requests

8 participants