aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-11-01 03:10:34 +0800
committerjdhao <jdhao@hotmail.com>2020-11-01 03:10:34 +0800
commit76393d321dbc940032d225bacef81c700e34149a (patch)
treeff6cdd10028b6a80a28225ee3b0cab94380783af /core
parent9b162ebab0ef1d19db34b1d8eb7780e6bd480087 (diff)
Disable gutentags for certain files.
Diffstat (limited to 'core')
-rw-r--r--core/plugins.vim12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/plugins.vim b/core/plugins.vim
index eabda6f..0839c7c 100644
--- a/core/plugins.vim
+++ b/core/plugins.vim
@@ -475,6 +475,18 @@ endif
"}}
"{{ Navigation and tags
+""""""""""""""""""""""""""" gutentags settings """"""""""""""""""""""""""""""
+function! ShouldEnableGutentags(path) abort
+ let l:disable_flist = ['md', 'pandoc', 'html', 'json', 'css', 'js', 'toml']
+ let l:file_ext = fnamemodify(a:path, ':e')
+ if index(l:disable_flist, l:file_ext) == -1
+ return 1
+ endif
+
+ return 0
+endfunction
+let g:gutentags_init_user_func = 'ShouldEnableGutentags'
+
""""""""""""""""""""""""""" vista settings """"""""""""""""""""""""""""""""""
" Double click to go to a tag
nnoremap <silent> <2-LeftMouse> :<C-U>call vista#cursor#FoldOrJump()<CR>