ale/autoload/ale/julia.vim

20 lines
615 B
VimL
Raw Permalink Normal View History

" Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com
" Description: Functions for integrating with Julia tools
2018-09-08 18:11:11 +00:00
" Find the nearest dir containing a julia project
let s:__ale_julia_project_filenames = ['REQUIRE', 'Manifest.toml', 'Project.toml']
2018-09-07 17:16:22 +00:00
2018-08-30 19:40:04 +00:00
function! ale#julia#FindProjectRoot(buffer) abort
2018-09-07 18:13:44 +00:00
for l:project_filename in s:__ale_julia_project_filenames
2018-08-30 19:40:04 +00:00
let l:full_path = ale#path#FindNearestFile(a:buffer, l:project_filename)
if !empty(l:full_path)
2018-09-07 17:16:22 +00:00
let l:path = fnamemodify(l:full_path, ':p:h')
2018-09-08 20:05:34 +00:00
2018-08-30 19:40:04 +00:00
return l:path
endif
endfor
2018-09-08 20:05:34 +00:00
2018-08-30 19:40:04 +00:00
return ''
2018-09-07 17:16:22 +00:00
endfunction