summaryrefslogtreecommitdiffstats
path: root/autoload/elm/util.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/elm/util.vim')
-rw-r--r--autoload/elm/util.vim8
1 files changed, 7 insertions, 1 deletions
diff --git a/autoload/elm/util.vim b/autoload/elm/util.vim
index aee823c5..6d1014e0 100644
--- a/autoload/elm/util.vim
+++ b/autoload/elm/util.vim
@@ -136,7 +136,13 @@ function! elm#util#GoToModule(name)
endfunction
function! s:findLocalModule(rel_path, root)
- let l:package_json = a:root . '/elm-package.json'
+ let l:old_match = findfile('elm-package.json', a:root . ';')
+ let l:new_match = findfile('elm.json', a:root . ';')
+ if !empty(l:new_match)
+ let l:package_json = l:new_match
+ elseif !empty(l:old_match)
+ let l:package_json = l:old_match
+ endif
if exists('*json_decode')
let l:package = json_decode(readfile(l:package_json))
let l:source_roots = l:package['source-directories']