# HG changeset patch # User Ludovic Chabant # Date 1552452230 25200 # Node ID 050d0549ecf35110c10d248002ec18537367a50e # Parent 23ce1c1b359f35dff32e2f5f7b928ba03e492544 Add `g:gutentags_add_ctrlp_root_markers` option. This lets users prevent Gutentags from appending CtrlP root markers, if found. diff -r 23ce1c1b359f -r 050d0549ecf3 autoload/gutentags.vim --- a/autoload/gutentags.vim Tue Mar 12 21:31:02 2019 -0700 +++ b/autoload/gutentags.vim Tue Mar 12 21:43:50 2019 -0700 @@ -188,7 +188,7 @@ let l:path = gutentags#stripslash(a:path) let l:previous_path = "" let l:markers = g:gutentags_project_root[:] - if exists('g:ctrlp_root_markers') + if g:gutentags_add_ctrlp_root_markers && exists('g:ctrlp_root_markers') for crm in g:ctrlp_root_markers if index(l:markers, crm) < 0 call add(l:markers, crm) diff -r 23ce1c1b359f -r 050d0549ecf3 doc/gutentags.txt --- a/doc/gutentags.txt Tue Mar 12 21:31:02 2019 -0700 +++ b/doc/gutentags.txt Tue Mar 12 21:43:50 2019 -0700 @@ -343,6 +343,14 @@ The default markers are: `['.git', '.hg', '.bzr', '_darcs', '_darcs', '_FOSSIL_', '.fslckout']` + *gutentags_add_ctrlp_root_markers* +g:gutentags_add_ctrlp_root_markers + If Gutentags finds `g:ctrlp_root_markers` (used by the + CtrlP plugin), it will append those root markers to + the existing ones (see |g:gutentags_project_root|). + Set this to 0 to stop it from happening. + Defaults to 1. + *gutentags_exclude_filetypes* g:gutentags_exclude_filetypes A |List| of file types (see |'filetype'|) that Gutentags diff -r 23ce1c1b359f -r 050d0549ecf3 plugin/gutentags.vim --- a/plugin/gutentags.vim Tue Mar 12 21:31:02 2019 -0700 +++ b/plugin/gutentags.vim Tue Mar 12 21:43:50 2019 -0700 @@ -38,6 +38,7 @@ let g:gutentags_init_user_func = get(g:, 'gutentags_init_user_func', \get(g:, 'gutentags_enabled_user_func', '')) +let g:gutentags_add_ctrlp_root_markers = get(g:, 'gutentags_add_ctrlp_root_markers', 1) 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', []) if g:gutentags_add_default_project_roots