Mercurial > vim-gutentags
comparison autoload/gutentags.vim @ 132:a6ef1c860d07
Add support for custom root finders like `vim-projectroot`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 20 Jul 2016 12:22:51 +0200 |
parents | ec57d6a14486 |
children | 04288637e595 |
comparison
equal
deleted
inserted
replaced
131:ec57d6a14486 | 132:a6ef1c860d07 |
---|---|
79 endfunction | 79 endfunction |
80 | 80 |
81 " Finds the first directory with a project marker by walking up from the given | 81 " Finds the first directory with a project marker by walking up from the given |
82 " file path. | 82 " file path. |
83 function! gutentags#get_project_root(path) abort | 83 function! gutentags#get_project_root(path) abort |
84 if g:gutentags_project_root_finder | |
85 return call(g:gutentags_project_root_finder, [a:path]) | |
86 endif | |
87 | |
84 let l:path = gutentags#stripslash(a:path) | 88 let l:path = gutentags#stripslash(a:path) |
85 let l:previous_path = "" | 89 let l:previous_path = "" |
86 let l:markers = g:gutentags_project_root[:] | 90 let l:markers = g:gutentags_project_root[:] |
87 if exists('g:ctrlp_root_markers') | 91 if exists('g:ctrlp_root_markers') |
88 let l:markers += g:ctrlp_root_markers | 92 let l:markers += g:ctrlp_root_markers |