summaryrefslogtreecommitdiff
path: root/ale_linters/elixir/mix.vim
diff options
context:
space:
mode:
authorColby Dehart <colbydehart@gmail.com>2018-06-07 11:47:57 -0500
committerColby Dehart <colbydehart@gmail.com>2018-06-07 11:47:57 -0500
commit864818a38528e91363fab3561c6359e272b35929 (patch)
tree6da9e43304b6877807c09dca1fbc9b392ee3e555 /ale_linters/elixir/mix.vim
parentf0f569f14a18459dcd99a381c5776f7464dfb125 (diff)
downloadale-864818a38528e91363fab3561c6359e272b35929.zip
WIP cd to project path
Diffstat (limited to 'ale_linters/elixir/mix.vim')
-rw-r--r--ale_linters/elixir/mix.vim10
1 files changed, 5 insertions, 5 deletions
diff --git a/ale_linters/elixir/mix.vim b/ale_linters/elixir/mix.vim
index 25ee8fb8..3af99ab4 100644
--- a/ale_linters/elixir/mix.vim
+++ b/ale_linters/elixir/mix.vim
@@ -31,11 +31,11 @@ function! ale_linters#elixir#mix#Handle(buffer, lines) abort
endfunction
function! ale_linters#elixir#mix#FindProjectRoot(buffer) abort
- let l:project_root = ale#path#FindNearestFile(a:buffer, 'mix.exs')
- if !empty(l:project_root)
- return fnamemodify(l:project_root, ':h')
+ 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 ''
+ return '.'
endfunction
function! ale_linters#elixir#mix#GetCommand(buffer) abort
@@ -47,7 +47,7 @@ function! ale_linters#elixir#mix#GetCommand(buffer) abort
\ ? 'set MIX_BUILD_PATH=' . ale#Escape(l:temp_dir) . ' && '
\ : 'MIX_BUILD_PATH=' . ale#Escape(l:temp_dir) . ' '
- return ale#path#CdString(l:project_root)
+ return ale#path#CdString(l:project_root)
\ . l:mix_build_path
\ . ' mix compile %s'
endfunction