File: julia.vim

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (19 lines) | stat: -rw-r--r-- 615 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
" Author: Bartolomeo Stellato bartolomeo.stellato@gmail.com
" Description: Functions for integrating with Julia tools

" Find the nearest dir containing a julia project
let s:__ale_julia_project_filenames = ['REQUIRE', 'Manifest.toml', 'Project.toml']

function! ale#julia#FindProjectRoot(buffer) abort
    for l:project_filename in s:__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, ':p:h')

            return l:path
        endif
    endfor

    return ''
endfunction