summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorBartolomeo Stellato <bartolomeo.stellato@gmail.com>2018-09-07 13:16:22 -0400
committerBartolomeo Stellato <bartolomeo.stellato@gmail.com>2018-09-07 13:16:22 -0400
commitf64f0bb48c6e080932ec3a99ac03a69a57f7a933 (patch)
tree8fc6dc36fcac631f52795403ec94426b409497b0 /autoload
parentdf72c5f1c11726a8db2c9c22fa579ee59238d0aa (diff)
downloadale-f64f0bb48c6e080932ec3a99ac03a69a57f7a933.zip
Added tests
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/julia.vim17
1 files changed, 5 insertions, 12 deletions
diff --git a/autoload/ale/julia.vim b/autoload/ale/julia.vim
index 71243763..a650504c 100644
--- a/autoload/ale/julia.vim
+++ b/autoload/ale/julia.vim
@@ -1,27 +1,20 @@
" Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com
" Description: Functions for integrating with Julia tools
-" Set julia executable variable
-call ale#Set('julia_executable', 'julia')
-
" Find the nearest dir contining a git project as julia project
-let g:__ale_julia_project_filenames = ['.git/HEAD']
+let g:__ale_julia_project_filenames = ['REQUIRE']
+
function! ale#julia#FindProjectRoot(buffer) abort
for l:project_filename in g:__ale_julia_project_filenames
let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename)
if !empty(l:full_path)
- let l:path = fnamemodify(l:full_path, ':h')
-
- " Correct .git path detection.
- if fnamemodify(l:path, ':t') is# '.git'
- let l:path = fnamemodify(l:path, ':h')
- endif
-
+ let l:path = fnamemodify(l:full_path, ':p:h')
return l:path
endif
+
endfor
return ''
-endfunction
+endfunction