Closed H12 closed 5 years ago
@H12 This looks solid to me. Only feedback is I think we can combine the two if statements since they are checking for the same result here: https://github.com/ElmCast/elm-vim/blob/dab5d39895d8df0ac5ecfd53cfbde7ab5de6d0fc/autoload/elm.vim#L351
@mdxprograms Thanks, I've updated so that the match
for elm-package.json
and elm.json
have their own variables, rather than re-assigning the original match
variable.
👍 LGTM!
Was running into an issue with
:ElmTest
in elm 0.19.0 where it was unable to find the root directory. Did a little digging, and found thatelm#FindRootDirectory
only looks forelm-package.json
, and notelm.json
.So I added a fallback so that if an
elm-package.json
cannot be found,FindRootDirectory
will look for anelm.json
file before returning an empty string. AfterPlug
ing my forked repo, this fix appears to have the desired behavior.I'm a total vimscript noob, though, so please let me know if anything looks off.