mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-12 17:55:41 +08:00
Add project rooter
This commit is contained in:
parent
1b09879385
commit
d98f1af1bd
@ -98,5 +98,23 @@ function! SpaceVim#plugins#projectmanager#kill_project() abort
|
||||
|
||||
endfunction
|
||||
|
||||
let g:spacevim_project_rooter_patterns = ['.git', '.git/', '_darcs/', '.hg/', '.bzr/', '.svn/']
|
||||
|
||||
function! s:find_root_directory() abort
|
||||
let fd = expand('%:p')
|
||||
let dirs = []
|
||||
for pattern in g:spacevim_project_rooter_patterns
|
||||
call add(dirs, SpaceVim#util#findFileInParent(pattern, fd))
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
|
||||
function! s:sort_dirs(dirs) abort
|
||||
|
||||
endfunction
|
||||
|
||||
function! s:change_to_root_directory() abort
|
||||
|
||||
endfunction
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user