Mercurial > vim-gutentags
diff autoload/gutentags.vim @ 244:d3f9a92399d1
Separate the default project marker finder into a function.
This lets people who write custom marker finders fallback to the default
behaviour if needed.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Wed, 13 Mar 2019 21:56:19 -0700 |
parents | 050d0549ecf3 |
children | 97723c1818e0 |
line wrap: on
line diff
--- a/autoload/gutentags.vim Tue Mar 12 21:43:50 2019 -0700 +++ b/autoload/gutentags.vim Wed Mar 13 21:56:19 2019 -0700 @@ -184,7 +184,13 @@ if g:gutentags_project_root_finder != '' return call(g:gutentags_project_root_finder, [a:path]) endif + return gutentags#default_get_project_root(a:path) +endfunction +" Default implementation for finding project markers... useful when a custom +" finder (`g:gutentags_project_root_finder`) wants to fallback to the default +" behaviour. +function! gutentags#default_get_project_root(path) abort let l:path = gutentags#stripslash(a:path) let l:previous_path = "" let l:markers = g:gutentags_project_root[:]