AST support : Context sensitive auto-completions in module declaration
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
## Summary
When the user positions the cursor inside an exposing node of a module declaration an editor should be able to suggest only top level items that are exposable. Duplicates should be filtered out.
## Details
1. Top level
Ref the following example: http://peg.arcanis.fr/3bbplj/2/
When the user types `a`, only `add` should be suggested
- Need a way to determine that the user has positioned the cursor inside the exposing node of a module declaration. (In the example above that is achieved by having a location node for each AST node
- Must be able to list exposable top level definitions for the given module (types, type aliases, functions, values)
- Must be able to list already exposed top level definitions (to filter dupes)
2. ADTs
Ref the following example: http://peg.arcanis.fr/3bbplj/3/
When the user type `N` inside MoveDirection(`N`), only `North` and `NorthWest` should be suggested.
- Need a way to determine that the user has positioned the cursor inside the exposing node of an exposed ADT
- Need to be able to list all possible types/type constructor for that given ADT
- Need to be able to list already exposed types for the given ADT to filter dupes
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the AST representation for module declarations and exposing nodes, using the linked top-level and ADT examples as behavioral references. Trace how cursor locations and exposed definitions are represented, then determine how both top-level items and ADT constructors can be enumerated while excluding duplicates. Done means the examples produce only the valid context-sensitive suggestions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elm, haskell
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100