# HG changeset patch # User Ludovic Chabant # Date 1465867502 25200 # Node ID 5776acb079cf83ac9e7b4b0a9bce967c5a2eafae # Parent 2838af9ff9804b7559b87ab4701afa8d4899cd53# Parent a66d90fd758bfc9e929b958d4cc6f349a907dcb0 Merge pull request #84 from GitHub. diff -r a66d90fd758b -r 5776acb079cf autoload/gutentags.vim --- a/autoload/gutentags.vim Sat May 14 02:59:15 2016 -0400 +++ b/autoload/gutentags.vim Mon Jun 13 18:25:02 2016 -0700 @@ -100,6 +100,15 @@ \1) call gutentags#throw("Marker found at root, aborting.") endif + for ign in g:gutentags_exclude_project_root + if l:proj_dir == ign + call gutentags#trace( + \"Ignoring project root '" . l:proj_dir . + \"' because it is in the list of ignored" . + \" projects.") + call gutentags#throw("Ignore project: " . l:proj_dir) + endif + endfor return l:proj_dir endif endfor @@ -180,7 +189,7 @@ call call("gutentags#".module."#init", [b:gutentags_root]) endfor catch /^gutentags\:/ - call gutentags#trace("Can't figure out what tag file to use... no gutentags support.") + call gutentags#trace("No gutentags support for this buffer.") return endtry diff -r a66d90fd758b -r 5776acb079cf doc/gutentags.txt --- a/doc/gutentags.txt Sat May 14 02:59:15 2016 -0400 +++ b/doc/gutentags.txt Mon Jun 13 18:25:02 2016 -0700 @@ -243,6 +243,18 @@ the user-defined ones: ['.git', '.hg', '.bzr', '_darcs']. + *gutentags_exclude_project_root* +g:gutentags_exclude_project_root + A list of project roots to generally ignore. If a file + is opened inside one of those projects, Gutentags + won't be activated. This is similar to placing + a `.notags` file in the root of those projects, but + can be useful when you don't want to, or can't, place + such a file there. + Defaults to ['/usr/local'], which is the folder where + Homebrew is known to create a Git directory by default + on MacOS. + *gutentags_exclude* g:gutentags_exclude A list of file patterns to pass to the diff -r a66d90fd758b -r 5776acb079cf plugin/gutentags.vim --- a/plugin/gutentags.vim Sat May 14 02:59:15 2016 -0400 +++ b/plugin/gutentags.vim Mon Jun 13 18:25:02 2016 -0700 @@ -35,6 +35,7 @@ call add(g:gutentags_project_info, {'type': 'ruby', 'file': 'Gemfile'}) let g:gutentags_exclude = get(g:, 'gutentags_exclude', []) +let g:gutentags_exclude_project_root = get(g:, 'gutentags_exclude_project_root', ['/usr/local']) let g:gutentags_resolve_symlinks = get(g:, 'gutentags_resolve_symlinks', 0) let g:gutentags_generate_on_new = get(g:, 'gutentags_generate_on_new', 1) let g:gutentags_generate_on_missing = get(g:, 'gutentags_generate_on_missing', 1)