halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Auto complete for nested constructors #106

Open joshhornby opened 6 years ago

joshhornby commented 6 years ago

Hi, auto completion currently works for single level types, see Foo below. But autocomplete for Baz wouldn't work in the following example

type Foo = Bar Baz

type Baz = A | B | C

viewFoo : Foo -> Html Msg
viewFoo foo = 
    case foo of
         Bar baz -> 
             case baz of -> .. -- This won't auto complete

Are there plans for this feature?

Thanks for this great plugin :)

halohalospecial commented 6 years ago

Hi @joshhornby, that requires more involved parsing. Right now, only top-level functions are parsed. Might be better to include that in the plans for the Elm Language Server instead since it will require major rearchitecting :smile: