-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add elixir-format function to format Elixir 1.6 files. #406
Conversation
@tonini Here is PR for elixir-format support in emacs-elixir. Let me know if you want any changes, I can do that. Hopefully this becomes part of emacs-elixir and see further contributions |
Hi @anildigital - I'll get to this Monday, I promise. |
Hi, This looks nice, I would consider to add two add to things:
|
I‘m currently at my mother-in-law‘s house for a visit, I can have a look at Monday
Via Mobile, deshalb kurz. Nicht unhöflich gemeint!
…
|
@ckruse @jekku @Trevoke You can do changes in https://github.com/anildigital/mix-format.el so that I can send updated PR here. I will be adding you all as Co-Authors to this PR. Thanks. |
@Trevoke any update? |
Hi @anildigital, I realize I didn't communicate well with you, I'm sorry. I'm a new maintainer of As far as the tests go, there are instructions in the |
Thanks. I will follow these links. cc @ckruse |
Hi, is this pull request ready to be merged? |
I'm not sure. I implemented tests and renamed everything to have a |
Hi @ckruse we need to merge changes done in https://github.com/anildigital/mix-format.el to this PR. But before that.. could you please send a PR to https://github.com/anildigital/emacs-elixir with tests. I this test-helper.el is conflicting there. Thanks. |
Hey! First of all, thanks for the effort on developing this feature! Any idea when this will be merged? Thanks! |
How would I test this in Spacemacs? 😄 |
That is a good question.
My time has been taken in a heavy refactor of the alchemist.el backend - a
part of that refactor involves enabling this feature. I could use a bunch
of help. Once that's done, all you'll have to do in spacemacs or anywhere
else would be updating alchemist.
On Mon, May 21, 2018, 14:11 John Hamelink ***@***.***> wrote:
How would I test this in Spacemacs? 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#406 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEJSXUUMvMhZnkKnWRlp_NpH11fGtQEks5t0wNcgaJpZM4P5a1t>
.
--
Phoned this one in.
|
README.md
Outdated
## Elixir Format | ||
|
||
### Setup of elixir-format | ||
Customize the elixir and mix pathes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be paths
.
Great, thank you for everyone's hard work. I will figure out why the build is failing. In the meanwhile, @anildigital, I have a few requests:
;; Create a buffer-local hook to run elixir-format on save, only when we enable elixir-mode.
(add-hook 'elixir-mode-hook
(lambda () (add-hook 'before-save-hook 'elixir-format nil t)))
Thanks again for working on this! |
@anildigital I have fixed the build. Please bring in the changes from this repo so you get the updated build config and Travis can do its work. |
1c7a3db
to
96e41d0
Compare
0c31b83
to
cf4357b
Compare
@Trevoke I have made changes as requested. The build is still failing for some reason I could not figure out. I ran tests on macOS and Ubuntu OSes and tests ran fine. Regarding #4 you mentioned, I think devs mostly will be coding with Elixir 1.6 now on. It would be overkill to check Elixir version everytime we call the elixir-format function. Also even if someone configures this plugin and tries to use Elixir 1.5 and earlier version, the |
Hi @anildigital, thank you! Now we can see how the PR compares to the existing test suite. Regarding calling elixir-format with an older version of Elixir, an error message displayed to the user is all I would like. What I was asking was, "where is the test that shows the error message to the user"? It sounds like that is already existing behavior, I just would like it formalized in a test so we can formalize what the expected behavior is from now on. Re: the failures, you can find information about them by following this link: https://travis-ci.org/elixir-editors/emacs-elixir/builds/384390061 When you ran your tests, what were the versions of emacs, elixir and erlang that you were using? Most of the build jobs are failures where some code receives
This build is also running on emacs 24.3. |
f5c2f33
to
687b9e2
Compare
Co-Authored-By: Christian Kruse <ckruse@users.noreply.github.com> Co-Authored-By: Peter Urbak <dragonwasrobot@users.noreply.github.com>
Thanks a lot, @Trevoke, builds are passing now with all supported versions. I spent some time to specially handle the case where |
Hi @anildigital, I was trying to work with the package and I didn't realize there was an orthogonal error. I fixed it on your side and now I'm completely OK with this being merged in as-is. It turned out I wasn't seeing the error buffer pop up and I was worried that it took away from usability. I really like the way this was put together! Thank you and everyone else for all their hard work, I'm merging it in. I'll wait a little bit before creating a stable release on Melpa. |
* Purge consolidated protocols before compilation Fixes elixir-editors#395 * move to dialyzer_test.exs * add comments * warn if ls fails
elixir-format
function formats Elixir 1.6 files with newmix format
command which will be available from Elixir 1.6.