Mercurial > vim-gutentags
changeset 128:e673026faa56
Add option to not append the default project root markers.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 13 Jun 2016 19:25:52 -0700 |
parents | db773e26e43b |
children | 48045d81f25a |
files | doc/gutentags.txt plugin/gutentags.vim |
diffstat | 2 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/gutentags.txt Mon Jun 13 19:15:17 2016 -0700 +++ b/doc/gutentags.txt Mon Jun 13 19:25:52 2016 -0700 @@ -239,9 +239,18 @@ file named after |gutentags_tagfile| will be created at the project root. Defaults to `[]` (an empty |List|). - A list of default markers will always be appended to - the user-defined ones: ['.git', '.hg', '.bzr', - '_darcs']. + A list of default markers will be appended to the + user-defined ones unless + |gutentags_add_default_project_roots| is set to 0. + + *gutentags_add_default_project_roots* +g:gutentags_add_default_project_roots + Defines whether Gutentags should always define some + default project roots (see |gutentags_project_root|). + This can be useful to prevent unnecessary disk access + when Gutentags searches for a project root. + The default markers are: + `['.git', '.hg', '.bzr', '_darcs', '_darcs', '_FOSSIL_', '.fslckout']` *gutentags_exclude_project_root* g:gutentags_exclude_project_root
--- a/plugin/gutentags.vim Mon Jun 13 19:15:17 2016 -0700 +++ b/plugin/gutentags.vim Mon Jun 13 19:25:52 2016 -0700 @@ -27,8 +27,11 @@ let g:gutentags_enabled_user_func = get(g:, 'gutentags_enabled_user_func', '') let g:gutentags_modules = get(g:, 'gutentags_modules', ['ctags']) +let g:gutentags_add_default_project_roots = get(g:, 'gutentags_add_default_project_roots', 1) let g:gutentags_project_root = get(g:, 'gutentags_project_root', []) -let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout'] +if g:gutentags_add_default_project_roots + let g:gutentags_project_root += ['.git', '.hg', '.svn', '.bzr', '_darcs', '_FOSSIL_', '.fslckout'] +endif let g:gutentags_project_info = get(g:, 'gutentags_project_info', []) call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'})