From 4d18a5e5dd427a2962fe34c6a12007cac67ce89c Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 23 Apr 2019 11:32:40 +0200 Subject: Update --- autoload/elm/util.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'autoload/elm/util.vim') 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'] -- cgit v1.2.3