diff autoload/gutentags/ctags.vim @ 141:7bc4df0225d1

Add support for specifying buffer-specific tagfiles.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 22 Sep 2016 22:14:17 -0700
parents 286e5b3095d0
children b178f2251982
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim	Thu Sep 22 21:06:58 2016 -0700
+++ b/autoload/gutentags/ctags.vim	Thu Sep 22 22:14:17 2016 -0700
@@ -17,8 +17,9 @@
 
 function! gutentags#ctags#init(project_root) abort
     " Figure out the path to the tags file.
+    let l:tagfile = getbufvar("", 'gutentags_tagfile', g:gutentags_tagfile)
     let b:gutentags_files['ctags'] = gutentags#get_cachefile(
-                \a:project_root, g:gutentags_tagfile)
+                \a:project_root, l:tagfile)
 
     " Set the tags file for Vim to use.
     if g:gutentags_auto_set_tags