From 01d553eaa984138359d033bae2aecaf78f1e2e81 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Wed, 18 May 2022 21:53:19 +0800 Subject: Improve vim tagbar config for golang --- .vim/after/plugin/tagbar.vim | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to '.vim') diff --git a/.vim/after/plugin/tagbar.vim b/.vim/after/plugin/tagbar.vim index 28faf47..67a9ba8 100644 --- a/.vim/after/plugin/tagbar.vim +++ b/.vim/after/plugin/tagbar.vim @@ -2,3 +2,29 @@ let g:tagbar_autoclose = 1 let g:tagbar_autofocus = 1 nnoremap s :TagbarToggle + +let g:tagbar_type_go = { + \ 'ctagstype': 'go', + \ 'kinds': [ + \ 'p:package', + \ 'i:imports', + \ 'c:constants', + \ 'v:variables', + \ 't:types', + \ 'n:interfaces', + \ 'w:fields', + \ 'e:embedded', + \ 'm:methods', + \ 'r:constructor', + \ 'f:functions' + \ ], + \ 'sro': '.', + \ 'kind2scope': { + \ 't': 'ctype', + \ 'n': 'ntype' + \ }, + \ 'scope2kind': { + \ 'ctype': 't', + \ 'ntype': 'n' + \ } + \ } -- cgit v1.2.3