# HG changeset patch # User Ludovic Chabant # Date 1542010047 28800 # Node ID 34bee0477b511de72cb46a17a9c2d42cb31815f2 # Parent b2d0b28d8001c007979601c621e4b2098925ee58 Add `g:gutentags_exclude_filetypes` setting. diff -r b2d0b28d8001 -r 34bee0477b51 autoload/gutentags.vim --- a/autoload/gutentags.vim Sun Nov 11 22:17:52 2018 -0800 +++ b/autoload/gutentags.vim Mon Nov 12 00:07:27 2018 -0800 @@ -248,6 +248,12 @@ return endif + " Don't setup gutentags for things that don't need it, or that could + " cause problems. + if index(g:gutentags_exclude_filetypes, &filetype) >= 0 + return + endif + " Let the user specify custom ways to disable Gutentags. if g:gutentags_init_user_func != '' && \!call(g:gutentags_init_user_func, [expand('%:p')]) diff -r b2d0b28d8001 -r 34bee0477b51 doc/gutentags.txt --- a/doc/gutentags.txt Sun Nov 11 22:17:52 2018 -0800 +++ b/doc/gutentags.txt Mon Nov 12 00:07:27 2018 -0800 @@ -343,6 +343,14 @@ The default markers are: `['.git', '.hg', '.bzr', '_darcs', '_darcs', '_FOSSIL_', '.fslckout']` + *gutentags_exclude_filetypes* +g:gutentags_exclude_filetypes + A |List| of file types (see |'filetype'|) that Gutentags + should ignore. When a buffer is opened, if its + 'filetype' is found in this list, Gutentags features + won't be available for this buffer. + Defaults to an empty list (`[]`). + *gutentags_exclude_project_root* g:gutentags_exclude_project_root A list of project roots to generally ignore. If a file diff -r b2d0b28d8001 -r 34bee0477b51 plugin/gutentags.vim --- a/plugin/gutentags.vim Sun Nov 11 22:17:52 2018 -0800 +++ b/plugin/gutentags.vim Mon Nov 12 00:07:27 2018 -0800 @@ -50,6 +50,7 @@ call add(g:gutentags_project_info, {'type': 'python', 'file': 'setup.py'}) call add(g:gutentags_project_info, {'type': 'ruby', 'file': 'Gemfile'}) +let g:gutentags_exclude_filetypes = get(g:, 'gutentags_exclude_filetypes', []) 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)