Skip to content

[purs ide] Groups reexports in completions#2907

Merged
kritzcreek merged 6 commits intopurescript:masterfrom
kritzcreek:psc-ide-group-reexports
Jun 4, 2017
Merged

[purs ide] Groups reexports in completions#2907
kritzcreek merged 6 commits intopurescript:masterfrom
kritzcreek:psc-ide-group-reexports

Conversation

@kritzcreek
Copy link
Copy Markdown
Member

@kritzcreek kritzcreek commented May 24, 2017

Adds an option to control how reexport should be grouped in the completions.

TODO:

  • Actually describe what this does behaviour wise
  • Figure out if this is the desired (default) behaviour
  • tests
  • Return the list of reexporting modules in the completion format

Fixes #2752, Fixes #2908

@coot
Copy link
Copy Markdown
Contributor

coot commented May 25, 2017

Adding where the identifier comes from to the output would allow to filter results (or group them) at the editor level.

@kritzcreek kritzcreek force-pushed the psc-ide-group-reexports branch from 0277647 to 352bd2d Compare May 29, 2017 03:16
@kritzcreek kritzcreek changed the title [WIP][purs ide] Groups reexports in completions [purs ide] Groups reexports in completions May 29, 2017
@kritzcreek
Copy link
Copy Markdown
Member Author

This is ready for review/discussion about API and whether this should become the default behaviour.

I kept the documentation somewhat brief, but I'll happily explain in more detail if something is unclear.

/cc @nwolverson @coot @FrigoEU

@kritzcreek kritzcreek force-pushed the psc-ide-group-reexports branch from 3e700a8 to 8f80f06 Compare May 29, 2017 03:39
"currentModule": "Main",
"options": {
"maxResults": 50
"groupReexports": ["Prelude", "Data.Array", "Data.List"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this outdated, having been switched to a boolean?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 👍

Adds an option to control how reexport should be grouped in the completions.
If the groupReexports flag is set, we just treat every export as a
reexport (Even from the origin module). This will require the editors to do a
little more work, but makes the behaviours consistent and predictable.
@kritzcreek kritzcreek force-pushed the psc-ide-group-reexports branch from e772122 to a97a5b2 Compare May 30, 2017 06:05
@kritzcreek
Copy link
Copy Markdown
Member Author

I'll merge this in for the upcoming release, since it's non-breaking. If I decide I don't like the API I'll change it again in the next breaking release. Please give feedback on whether this is useful if you happen to use it in your editor plugins.

@kritzcreek kritzcreek merged commit 2bd101d into purescript:master Jun 4, 2017
@kritzcreek kritzcreek deleted the psc-ide-group-reexports branch June 4, 2017 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants