diff options
author | Guangxiong Lin <[email protected]> | 2022-05-18 21:53:19 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-05-18 21:53:19 +0800 |
commit | 01d553eaa984138359d033bae2aecaf78f1e2e81 (patch) | |
tree | 55fa97111b03aed0f834a3950dc1d10c1b8c7596 | |
parent | 8ea2fa9b183317e902110db221ebe10e087cb23e (diff) | |
download | dotfiles-01d553eaa984138359d033bae2aecaf78f1e2e81.tar.gz dotfiles-01d553eaa984138359d033bae2aecaf78f1e2e81.tar.bz2 dotfiles-01d553eaa984138359d033bae2aecaf78f1e2e81.zip |
Improve vim tagbar config for golang
-rw-r--r-- | .vim/after/plugin/tagbar.vim | 26 |
1 files changed, 26 insertions, 0 deletions
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 <leader><leader>s :TagbarToggle<CR> + +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' + \ } + \ } |