Discussion:
[elm-discuss] any editor supports elm simple whole-buffer reformat?
Raoul Duke
2017-06-30 21:49:37 UTC
Permalink
hi,

One use case I have in all programming systems is to auto reformat a whole
file buffer (let alone a whole directory tree of code). I tried doing that
in emacs elm-mode but it seems that it doesn't quite know enough to do what
I am hoping for. Is there any emacs mode for elm that knows what to do
automagically?

I also just tried it in atom, with language-elm, and it doesn't seem to
know either. Is there any good working editor system that can do it? Is
there something about elm's BNF-or-whatever that prevents editors from
being able to do it? (Does it support my long held believe that whitespace
sensitive syntax being a bad idea when all concerns are weighed? :-)

(I did try to get set up with lighttable but that was sort of a miserable
experience for me to date, so i haven't gotten to the point of trying auto
reformat there.)

thank you!
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
N H
2017-06-30 21:55:12 UTC
Permalink
In Elm, we have a single formatting tool which is used by all plugins,
known as elm-format: https://github.com/avh4/elm-format

You may not have installed it yet. Check out the README in that repo and
it'll tell you what to do.
Post by Raoul Duke
hi,
One use case I have in all programming systems is to auto reformat a whole
file buffer (let alone a whole directory tree of code). I tried doing that
in emacs elm-mode but it seems that it doesn't quite know enough to do what
I am hoping for. Is there any emacs mode for elm that knows what to do
automagically?
I also just tried it in atom, with language-elm, and it doesn't seem to
know either. Is there any good working editor system that can do it? Is
there something about elm's BNF-or-whatever that prevents editors from
being able to do it? (Does it support my long held believe that whitespace
sensitive syntax being a bad idea when all concerns are weighed? :-)
(I did try to get set up with lighttable but that was sort of a miserable
experience for me to date, so i haven't gotten to the point of trying auto
reformat there.)
thank you!
--
You received this message because you are subscribed to the Google Groups
"Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Raoul Duke
2017-06-30 23:36:35 UTC
Permalink
Thanks! Will do. (Dunno if it would be cool if the editor plugins had it
built in already?)
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Raoul Duke
2017-06-30 23:55:25 UTC
Permalink
So I just tried elm-format in emacs elm-mode and it... wasn't such a
good experience. Is there currently a best editor for Elm that is the
most bullet proof / featureful? That doesn't require me to do all
sorts of setup that might/not work?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
N H
2017-07-01 00:13:35 UTC
Permalink
There is a table in the README for elm-format explaining all the different
editors that have support for it and the setup steps required. I suggest
checking that out to get an idea
Post by Raoul Duke
So I just tried elm-format in emacs elm-mode and it... wasn't such a
good experience. Is there currently a best editor for Elm that is the
most bullet proof / featureful? That doesn't require me to do all
sorts of setup that might/not work?
--
You received this message because you are subscribed to the Google Groups
"Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Raoul Duke
2017-07-01 00:32:55 UTC
Permalink
Thanks! I did do that. Did sorta get it working in emacs mode! But
overall it didn't / doesn't seem to work so well, as I said -- wonky
UX. Now hoping for something that really just works out of the box
w/out any extra config at all? I.e. a real IDE where the errors are
shown inline with red squiggly underlining, that kind of thing. I am
not a VIM person so the elm-format editor support table shows me the
only other choices are LightTable and Atom I guess. I'll try again to
get Atom going... I can now do the Ctrl+Alt+B thing there. But it
doesn't seem to really be easily out-of-the-box integrated with the
compiler? There's apparently linter-elm-make but that looks like yet
more steps of things that might or might not work and the on-the-fly
is experimental? I guess I am coming to the conclusion that there
isn't really a real IDE experience for elm.

(I am now learning the hard way that I don't like elm's recommended
formatting much oh well. We should all have languages that use AST/ASG
instead of subjective syntax-ASCII, so that everybody can have their
own format and yet never have to merge based on inconsistent /
differently opinionated ASCII. :-)
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Rupert Smith' via Elm Discuss
2017-07-02 17:53:49 UTC
Permalink
Post by Raoul Duke
Thanks! I did do that. Did sorta get it working in emacs mode! But
overall it didn't / doesn't seem to work so well, as I said -- wonky
UX. Now hoping for something that really just works out of the box
w/out any extra config at all?
I am also a fan of Emacs, but have not had much joy with Emacs and Elm.
Probably we are in a minority liking both Emacs and Elm.

Try Atom + elmjitsu + elm-format.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Zachary Kessin
2017-07-03 06:55:17 UTC
Permalink
I have found elm and emacs work just fine it just takes some fine tuning

Zach
ᐧ

On Sun, Jul 2, 2017 at 8:53 PM, 'Rupert Smith' via Elm Discuss <
Post by 'Rupert Smith' via Elm Discuss
Post by Raoul Duke
Thanks! I did do that. Did sorta get it working in emacs mode! But
overall it didn't / doesn't seem to work so well, as I said -- wonky
UX. Now hoping for something that really just works out of the box
w/out any extra config at all?
I am also a fan of Emacs, but have not had much joy with Emacs and Elm.
Probably we are in a minority liking both Emacs and Elm.
Try Atom + elmjitsu + elm-format.
--
You received this message because you are subscribed to the Google Groups
"Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
Zach Kessin
Teaching Web Developers to test code to find more bugs in less time
Skype: zachkessin
+972 54 234 3956 / +44 203 734 9790 / +1 617 778 7213
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Rupert Smith' via Elm Discuss
2017-07-03 13:31:28 UTC
Permalink
Post by Zachary Kessin
I have found elm and emacs work just fine it just takes some fine tuning
Care to share some of your emacs configuration?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wendel Wang
2017-07-06 16:01:34 UTC
Permalink
For me the LightTable elm-light plugin works well.
You install it with the plugin manager and then set up the keymapping
depending on you rpreferences.
An example setup is given in the elm-light docu that you can just cut and
paste into you user-settings file.

I have set up elm-format on save.

Some other functions are also useful and in-editor linting works as well.

You mentioned you faced difficulties using LightTable. What was the problem?
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Chad Woolley
2017-07-03 15:50:28 UTC
Permalink
FWIW, I was able to get elm-format to auto-format on save in Jetbrains IDEs
(RubyMine specifically, but should work in any of them). Took a little
extra scripting glue and macros, but it worked.

-- Chad
Post by Raoul Duke
hi,
One use case I have in all programming systems is to auto reformat a whole
file buffer (let alone a whole directory tree of code). I tried doing that
in emacs elm-mode but it seems that it doesn't quite know enough to do what
I am hoping for. Is there any emacs mode for elm that knows what to do
automagically?
I also just tried it in atom, with language-elm, and it doesn't seem to
know either. Is there any good working editor system that can do it? Is
there something about elm's BNF-or-whatever that prevents editors from
being able to do it? (Does it support my long held believe that whitespace
sensitive syntax being a bad idea when all concerns are weighed? :-)
(I did try to get set up with lighttable but that was sort of a miserable
experience for me to date, so i haven't gotten to the point of trying auto
reformat there.)
thank you!
--
You received this message because you are subscribed to the Google Groups
"Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...