mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-22 20:11:26 +08:00
FIX: use mix from the project root directory (#1954)
* FIX: use mix from the project root directory * Move find root project function to autoloaded handlers * add tests for #ale#handlers#elixr#FindMixProjectRoot
This commit is contained in:
13
autoload/ale/handlers/elixir.vim
Normal file
13
autoload/ale/handlers/elixir.vim
Normal file
@@ -0,0 +1,13 @@
|
||||
" Author: Matteo Centenaro (bugant) - https://github.com/bugant
|
||||
"
|
||||
" Description: find the root directory for an elixir project that uses mix
|
||||
|
||||
function! ale#handlers#elixir#FindMixProjectRoot(buffer) abort
|
||||
let l:mix_file = ale#path#FindNearestFile(a:buffer, 'mix.exs')
|
||||
|
||||
if !empty(l:mix_file)
|
||||
return fnamemodify(l:mix_file, ':p:h')
|
||||
endif
|
||||
|
||||
return '.'
|
||||
endfunction
|
||||
Reference in New Issue
Block a user