From 1998a4580528322d4865cbdf9163abd362d0c470 Mon Sep 17 00:00:00 2001 From: PreslavMihaylov Date: Sat, 27 Apr 2019 09:06:04 +0300 Subject: [PATCH] added support for golang for exuberant ctags --- autoload/tagbar/types/ctags.vim | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/autoload/tagbar/types/ctags.vim b/autoload/tagbar/types/ctags.vim index 442466c..e225f13 100644 --- a/autoload/tagbar/types/ctags.vim +++ b/autoload/tagbar/types/ctags.vim @@ -292,6 +292,27 @@ function! tagbar#types#ctags#init(supported_types) abort \ 'subroutine' : 's' \ } let types.fortran = type_fortran + " Go {{{1 + let type_go = tagbar#prototypes#typeinfo#new() + let type_go.ctagstype = 'go' + let type_go.kinds = [ + \ {'short' : 'p', 'long' : 'packages', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 0}, + \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0}, + \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'm', 'long' : 'struct members', 'fold' : 0, 'stl' : 0}, + \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0} + \ ] + let type_go.sro = '.' + let type_go.kind2scope = { + \ 's' : 'struct' + \ } + let type_go.scope2kind = { + \ 'struct' : 's' + \ } + let types.go = type_go " HTML {{{1 let type_html = tagbar#prototypes#typeinfo#new() let type_html.ctagstype = 'html'