Skip to content

Commit

Permalink
Merge pull request #173 from matzko/master
Browse files Browse the repository at this point in the history
Find local modules in Elm .19 as well as older versions.
  • Loading branch information
mdxprograms committed Apr 5, 2019
2 parents b8e31fc + 6776ecf commit 659d6de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion autoload/elm/util.vim
Expand Up @@ -132,7 +132,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']
Expand Down

0 comments on commit 659d6de

Please sign in to comment.