diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-04-23 11:32:40 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-04-23 11:32:40 +0200 |
commit | 4d18a5e5dd427a2962fe34c6a12007cac67ce89c (patch) | |
tree | 1a7cb73806c54fbbdc1e3645e0ee1d7e5559c1a0 /autoload/elm/util.vim | |
parent | a55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5 (diff) | |
download | vim-polyglot-4d18a5e5dd427a2962fe34c6a12007cac67ce89c.tar.gz vim-polyglot-4d18a5e5dd427a2962fe34c6a12007cac67ce89c.zip |
Update
Diffstat (limited to 'autoload/elm/util.vim')
-rw-r--r-- | autoload/elm/util.vim | 8 |
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'] |