ElmCast / elm-vim

Elm plugin for Vim
BSD 3-Clause "New" or "Revised" License
573 stars 102 forks source link

Added setting to control the path of `elm-format` #162

Open adiron opened 6 years ago

adiron commented 6 years ago

Some distributions of elm-format (e.g. Homebrew on Mac) give the executable(s) names such as elm-format-0.19. Previously, the plugin would try to run elm-format or else fail. Now, I have added g:elm_format_command which can be set to any command/path/etc. so elm-format can run even if installed under a weird path.

jesse-c commented 6 years ago

I wonder if this and #162 could be merged together?

We could also add the option to allow extra args, such as --elm-version like ALE allows.

adiron commented 6 years ago

Hey. Not sure which PR you're referring to, since this is #162 :P But either way I can try my best, though my viml is very basic

jesse-c commented 6 years ago

Haha, sorry, #146.

adiron commented 6 years ago

From the looks of it, that PR deals with basically the same thing this one deals with, so I'm fine with closing mine

jesse-c commented 6 years ago

I haven't had a proper look through the code, so I'm not sure which is a better implementation (though both are quite similar). @otaconix what do you think?

otaconix commented 6 years ago

The fact our two diffs are so alike gives me confidence that the approach I took is probably the right one. I'd be absolutely fine with this PR being chosen over mine.

Literally the only thing of note among the differences there are, is the name of the variable: elm_format_binary in my PR, elm_format_command in this one. Don't think you could go wrong with either.

jesse-c commented 6 years ago

Honestly it's up to you guys, maybe just flip a coin. 😂 #146 is older at least and has just slightly better comments.