Skip to content

Complete type identifiers following '::' in REPL#3239

Merged
kritzcreek merged 5 commits intopurescript:masterfrom
rndnoise:completion-for-type-annotations
Apr 14, 2018
Merged

Complete type identifiers following '::' in REPL#3239
kritzcreek merged 5 commits intopurescript:masterfrom
rndnoise:completion-for-type-annotations

Conversation

@rndnoise
Copy link
Copy Markdown
Contributor

@rndnoise rndnoise commented Feb 2, 2018

Prior to this PR, the only time types are auto-completed is following :kind. With this change, the first word following :: is completed from the names of types in scope.

One limitation is only the very next word is completed as a type, so even after typing [1] :: Array, where Array is a type constructor, the next word will be completed from CtxIdentifier, or the names of values in scope.

This PR depends on #3237 to be merged, because this PR's unit tests depending on it.

- Complete all names that have been imported (transitively or directly)
- Do not complete names that haven't been imported
- Only recompute list of names after import or adding a let binding
  rather than after each request for name completion

This commit fixes #3227
@kritzcreek
Copy link
Copy Markdown
Member

I might've merged things in the wrong order? If you fix the conflicts I'll give this a try and get it merged :)

@rndnoise
Copy link
Copy Markdown
Contributor Author

rndnoise commented Mar 23, 2018

No problem. I think these conflicted in any merge order. This should be OK to merge again.

@kritzcreek
Copy link
Copy Markdown
Member

Tested this, and it seems to work fine, thanks!

@kritzcreek kritzcreek merged commit f509ffe into purescript:master Apr 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants