mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-08 05:24:46 +08:00
Added tests
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user