plugins: Gutentags only for some filetypes
authorStefan Huber <shuber@sthu.org>
Thu, 23 Dec 2021 19:48:40 +0000 (20:48 +0100)
committerStefan Huber <shuber@sthu.org>
Thu, 23 Dec 2021 19:49:10 +0000 (20:49 +0100)
plugins-noroot.vim

index da94c500d8634a761cc65e4cd319dca9a39a5cb2..f88134f6a96e81580aba0dd33a2b8a39f834cbe8 100644 (file)
@@ -1,7 +1,7 @@
 Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'}
 
 Plug 'majutsushi/tagbar', {'on': 'TagbarToggle'}
 
-" Disable conditional loading to have gutentags also for tex files
-Plug 'ludovicchabant/vim-gutentags' ", {'for': ['c', 'cpp', 'objc', 'tex']}
+" Conditional loading does not work, see github issue #823
+Plug 'ludovicchabant/vim-gutentags'
 "Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']}
 
 Plug 'editorconfig/editorconfig-vim'
 "Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']}
 
 Plug 'editorconfig/editorconfig-vim'
@@ -45,4 +45,8 @@ function PluginsNorootConfig()
     let g:vim_markdown_math=1
 
     au FileType markdown call RagtagInit()
     let g:vim_markdown_math=1
 
     au FileType markdown call RagtagInit()
+
+    " Generally disable gutentags, but enable for some filetypes
+    let g:gutentags_enabled = 0
+    au FileType c,cpp,objc,tex let g:gutentags_enabled = 1
 endfunction
 endfunction