Mercurial > vim-gutentags
changeset 120:5776acb079cf
Merge pull request #84 from GitHub.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 13 Jun 2016 18:25:02 -0700 |
parents | 2838af9ff980 (diff) a66d90fd758b (current diff) |
children | 3763e9f412e7 |
files | plugin/gutentags.vim |
diffstat | 3 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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
--- 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)