google / google/codeworld

Auto-complete should be type-sensitive

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Haskell
Stars
1.3k
Forks
201
PR merge metrics
No merged PRs in 30d

Description

We can do a better job of showing only the auto-complete options that might fit in a certain context. For example, we could look around the current cursor position to see if the user is typing a function call, and if so, look up the type of the function, and only show function names if they might eventually lead to the desired result type.

This would necessarily be a heuristic, since the user is typing the program, so it's guaranteed to not be syntactically correct most of the time; but there's a lot we can do.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the autocomplete implementation and the code that handles the cursor context; the issue does not name specific files or tests. Read how suggestions are currently gathered, then determine how type-sensitive filtering could be evaluated for incomplete programs. Done means relevant suggestions are narrowed heuristically without preventing useful completions.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.