rescript-lang / rescript-lang/rescript-vscode
Type based autocompletion
Open
Nobody has claimed this yet.
- Dominant language
- ReScript
- Stars
- 354
- Forks
- 63
- Avg merge
- 11h 29m
- Merged PRs (30d)
- 1
Description
Rough outline of what work to do in what order:
- Type based completion for function arguments https://github.com/rescript-lang/rescript-vscode/pull/668
- Complete booleans, options, variant constructors https://github.com/rescript-lang/rescript-vscode/pull/668
- Type based completion for JSX props https://github.com/rescript-lang/rescript-vscode/pull/667
- Support snippets in completion items https://github.com/rescript-lang/rescript-vscode/pull/668
- Complete polyvariants https://github.com/rescript-lang/rescript-vscode/pull/669
- Complete record construction https://github.com/rescript-lang/rescript-vscode/pull/682
- Complete tuples https://github.com/rescript-lang/rescript-vscode/pull/668
- Complete nested expressions when constructing values https://github.com/rescript-lang/rescript-vscode/pull/682
- Complete patterns in switches https://github.com/rescript-lang/rescript-vscode/pull/670
- Complete patterns when destructing https://github.com/rescript-lang/rescript-vscode/pull/670
- Expand completion option items when appropriate.
Some(_)->Some(true)andSome(false)for example https://github.com/rescript-lang/rescript-vscode/pull/690 - Piggy back on
Ppat_any(_) to trigger completion https://github.com/rescript-lang/rescript-vscode/pull/692 - Support inline records in completion https://github.com/rescript-lang/rescript-vscode/pull/695
- Handle optional record fields https://github.com/rescript-lang/rescript-vscode/pull/691
- Complete functions (insert empty function) https://github.com/rescript-lang/rescript-vscode/pull/701
- Complete lowercase jsx props too https://github.com/rescript-lang/rescript-vscode/pull/702
- Complete using type annotations https://github.com/rescript-lang/rescript-vscode/pull/711
- "Seen idents" for more patterns
- Leverage "filterText" to ensure module names aren't included when filtering completion list (unless only searching for modules)
- Do not add "any" when inserting variant payloads in expressions
Things to figure out
-
Qualify JSX V3 constructorsNot doing this, let people upgrade to jsx v4 to fix it - Fix
insertTextnot being used unless there's snippet support - Figure out more instances where we want to do typed expr or pattern completion
Future
- Figure out when to expand options in JSX props (read more in description of https://github.com/rescript-lang/rescript-vscode/pull/667). Will need to parse the React component
makefunction and look whether prop is optional or not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the three unchecked checklist items and the “Things to figure out” section, then read the linked pull requests for context on the completed completion work. Done means implementing the selected remaining completion behaviors and resolving the listed open questions, with coverage added wherever the existing project conventions require it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100