1
0
Fork 0
mirror of synced 2024-11-23 01:05:34 -05:00
ultimate-vim/sources_non_forked/ale/autoload/ale/swift.vim
Amir Salihefendic fae0b73f0d Updated plugins
2019-05-17 16:09:13 +02:00

13 lines
456 B
VimL

" Author: Dan Loman <https://github.com/namolnad>
" Description: Functions for integrating with Swift tools
" Find the nearest dir containing a Package.swift file and assume it is the root of the Swift project.
function! ale#swift#FindProjectRoot(buffer) abort
let l:swift_config = ale#path#FindNearestFile(a:buffer, 'Package.swift')
if !empty(l:swift_config)
return fnamemodify(l:swift_config, ':h')
endif
return ''
endfunction