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

Enable features in unsaved editors with Elm syntax #64

Open canadaduane opened 7 years ago

canadaduane commented 7 years ago

When I'm working inside a project with other elm files (presumably an elm-package.json file is required), the following steps will freeze the Atom Editor:

  1. Create a new file (cmd-N)
  2. Without saving to disk, choose Elm as the syntax (lower-right corner, click "Plain Text", choose "Elm" in subsequent drop-down list)
  3. Type something that can be Auto imported, e.g. "update"
  4. Choose "Auto import" from the menu

The Atom window for the file will freeze.

image

halohalospecial commented 7 years ago

Hi @canadaduane! For simplicity's sake, it's not supposed to show suggestions for non-Elm files :grinning: I'll add some checks in the next release.

Do you have a use case where you really need to set the syntax of the editor to "Elm" and not save to a file?

canadaduane commented 7 years ago

I was trying to write a syntax-highlighted example of some Elm for someone on the mailing list, with the intention of copy-pasting to the mailing list.

On Mon, Mar 13, 2017 at 4:34 AM, halohalospecial notifications@github.com wrote:

Hi @canadaduane https://github.com/canadaduane! For simplicity's sake, it's not supposed to show suggestions for non-Elm files 😀 I'll add some checks in the next release.

Do you have a use case where you really need to set the syntax of the editor to "Elm" and not save to a file?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halohalospecial/atom-elmjutsu/issues/64#issuecomment-286070693, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAgfLxxwt2azrN8pzcoeHiHgKmdPc2ks5rlRvGgaJpZM4MaSiu .

halohalospecial commented 7 years ago

Hi! The code will still get syntax-highlighted because of the language-elm Atom package. Elmjutsu features will only work on .elm files though :-)

canadaduane commented 7 years ago

It's still very nice to have elmjutsu fill things in when developing "throw-away" code like this

On Mon, Mar 13, 2017 at 8:51 AM, halohalospecial notifications@github.com wrote:

Hi! The code will still get syntax-highlighted because of the language-elm Atom package. Elmjutsu features will only work on .elm files though :-)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halohalospecial/atom-elmjutsu/issues/64#issuecomment-286130381, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAAgcle__shiVLxWKULI5cbU5AC5IEJks5rlVfkgaJpZM4MaSiu .

halohalospecial commented 7 years ago

Hi! I still have to think about the implications of adding this. I'll put this on low priority for now :smile: You can create temporary .elm files in the meantime.