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

Atom Freezes when typing a space after a set of curly braces #119

Closed SidneyNemzer closed 6 years ago

SidneyNemzer commented 6 years ago

MCVE

  1. Create a new Elm file, for example Test.elm.
  2. Inside the the file, write the following:
a {}<space>

Upon typing the \<space>, Atom freezes.

a is arbitrary -- it's the name of a declaration in this context, but the freeze occurs with any name as far as I can tell. Adding keys to the record is possible, but Atom still freezes after typing the space after the destructuring.

The curly braces seem to cause the problem; a<space>... does not freeze Atom.

Notes

SidneyNemzer commented 6 years ago

Update: this also occurs with tuples:

a ()<space> causes a freeze

halohalospecial commented 6 years ago

@SidneyNemzer, this is indeed a bug. You can uncheck Enable Signature Help in the meantime if you keep on running into this. I'm checking it right now. Thanks!

halohalospecial commented 6 years ago

@SidneyNemzer, can you try the latest version (v8.1.3) with Enable Signature Help checked? Thanks!

SidneyNemzer commented 6 years ago

Better! But tuples and records inside a declaration still cause a freeze

-- Works now:
a ()<space>
a {}<space>

-- Freezes:
a = ()<space>
a = {}<space>
SidneyNemzer commented 6 years ago

I also found that parentises that don't denote a tuple still cause a freeze:

a = (b >> c)<space> -- Freeze
halohalospecial commented 6 years ago

@SidneyNemzer, how about v8.1.4?

SidneyNemzer commented 6 years ago

Seems to be fixed now. Thanks for the quick responses!

halohalospecial commented 6 years ago

Thank you too!