Mercurial > vim-gutentags
changeset 229:34bee0477b51
Add `g:gutentags_exclude_filetypes` setting.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 12 Nov 2018 00:07:27 -0800 |
parents | b2d0b28d8001 |
children | a798f7ad11c5 |
files | autoload/gutentags.vim doc/gutentags.txt plugin/gutentags.vim |
diffstat | 3 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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')])
--- 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
--- 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)