Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Idea: Keep sorting of type definition in sync with case statements #103

Open
brasilikum opened this issue Nov 13, 2017 · 3 comments

Comments

@brasilikum
Copy link

Often I find myself sorting bigger type definitions (Msg or Page) in order to group them by similarity.
It would be cool if the case statements could default to the same sorting.
I am aware that case statements can have a different structure because of "sub matches".

Meta: Is GitHub the right place to propose these ideas? @halohalospecial I did not find you in the elm-slack.

@halohalospecial
Copy link
Owner

Hi! I'm assuming you're talking about autocomplete for case expressions? It will follow the order the type cases were defined.

For example,

type Msg =
  | NoOp
  | Msg1 String
  | Msg2 Int

will result to

case msg of
    NoOp ->
        ...
    Msg1 string ->
        ...
    Msg2 int ->
        ...

So you can sort at the type definition point instead.

Meta: Yep, just submit ideas to this repo so I can keep track of them (and for discussions). You can also leave messages in the Elm Slack (same username).

@brasilikum
Copy link
Author

Hi,

yes I am, but there is currently no way to keep them synced if you add something, or did I miss that?
Not a killer feature, which might show that this package is already pretty awesome :)

I have seen there is some elm in this package, but it does not seem like much. Are most features implemented in JS? What would be good ways to contribute?

@halohalospecial
Copy link
Owner

Hi, the core is in Elm (https://github.com/halohalospecial/atom-elmjutsu/blob/master/elm/Indexer.elm) and JS is for integration with the Atom API.

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

No branches or pull requests

2 participants