mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Separate {ex,u}ctags definitions out into individual files
This commit is contained in:
@@ -57,7 +57,6 @@ let s:init_done = 0
|
||||
let s:checked_ctags = 0
|
||||
let s:checked_ctags_types = 0
|
||||
let s:ctags_is_uctags = 0
|
||||
let s:ctags_types = {}
|
||||
|
||||
let s:new_window = 1
|
||||
let s:is_maximized = 0
|
||||
@@ -100,10 +99,6 @@ function! s:Init(silent) abort
|
||||
endif
|
||||
endif
|
||||
|
||||
if !s:checked_ctags_types
|
||||
call s:GetSupportedFiletypes()
|
||||
endif
|
||||
|
||||
if !s:type_init_done
|
||||
call s:InitTypes()
|
||||
endif
|
||||
@@ -121,344 +116,19 @@ endfunction
|
||||
function! s:InitTypes() abort
|
||||
call s:debug('Initializing types')
|
||||
|
||||
let s:known_types = {}
|
||||
let supported_types = s:GetSupportedFiletypes()
|
||||
|
||||
" Ant {{{3
|
||||
let type_ant = tagbar#prototypes#typeinfo#new()
|
||||
let type_ant.ctagstype = 'ant'
|
||||
let type_ant.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'projects', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.ant = type_ant
|
||||
" Asm {{{3
|
||||
let type_asm = tagbar#prototypes#typeinfo#new()
|
||||
let type_asm.ctagstype = 'asm'
|
||||
let type_asm.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'defines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.asm = type_asm
|
||||
" ASP {{{3
|
||||
let type_aspvbs = tagbar#prototypes#typeinfo#new()
|
||||
let type_aspvbs.ctagstype = 'asp'
|
||||
let type_aspvbs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.aspvbs = type_aspvbs
|
||||
" Asymptote {{{3
|
||||
" Asymptote gets parsed well using filetype = c
|
||||
let type_asy = tagbar#prototypes#typeinfo#new()
|
||||
let type_asy.ctagstype = 'c'
|
||||
let type_asy.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_asy.sro = '::'
|
||||
let type_asy.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_asy.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let s:known_types.asy = type_asy
|
||||
" Awk {{{3
|
||||
let type_awk = tagbar#prototypes#typeinfo#new()
|
||||
let type_awk.ctagstype = 'awk'
|
||||
let type_awk.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.awk = type_awk
|
||||
" Basic {{{3
|
||||
let type_basic = tagbar#prototypes#typeinfo#new()
|
||||
let type_basic.ctagstype = 'basic'
|
||||
let type_basic.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.basic = type_basic
|
||||
" BETA {{{3
|
||||
let type_beta = tagbar#prototypes#typeinfo#new()
|
||||
let type_beta.ctagstype = 'beta'
|
||||
let type_beta.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'fragments', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'slots', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'patterns', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.beta = type_beta
|
||||
" C {{{3
|
||||
let type_c = tagbar#prototypes#typeinfo#new()
|
||||
let type_c.ctagstype = 'c'
|
||||
let type_c.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_c.sro = '::'
|
||||
let type_c.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_c.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let s:known_types.c = type_c
|
||||
" C++ {{{3
|
||||
let type_cpp = tagbar#prototypes#typeinfo#new()
|
||||
let type_cpp.ctagstype = 'c++'
|
||||
let type_cpp.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_cpp.sro = '::'
|
||||
let type_cpp.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'n' : 'namespace',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_cpp.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'namespace' : 'n',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let s:known_types.cpp = type_cpp
|
||||
let s:known_types.cuda = type_cpp
|
||||
" C# {{{3
|
||||
let type_cs = tagbar#prototypes#typeinfo#new()
|
||||
let type_cs.ctagstype = 'c#'
|
||||
let type_cs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_cs.sro = '.'
|
||||
let type_cs.kind2scope = {
|
||||
\ 'n' : 'namespace',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'g' : 'enum'
|
||||
\ }
|
||||
let type_cs.scope2kind = {
|
||||
\ 'namespace' : 'n',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'enum' : 'g'
|
||||
\ }
|
||||
let s:known_types.cs = type_cs
|
||||
" COBOL {{{3
|
||||
let type_cobol = tagbar#prototypes#typeinfo#new()
|
||||
let type_cobol.ctagstype = 'cobol'
|
||||
let type_cobol.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'data items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'file descriptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'group items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'program ids', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.cobol = type_cobol
|
||||
" DOS Batch {{{3
|
||||
let type_dosbatch = tagbar#prototypes#typeinfo#new()
|
||||
let type_dosbatch.ctagstype = 'dosbatch'
|
||||
let type_dosbatch.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.dosbatch = type_dosbatch
|
||||
" Eiffel {{{3
|
||||
let type_eiffel = tagbar#prototypes#typeinfo#new()
|
||||
let type_eiffel.ctagstype = 'eiffel'
|
||||
let type_eiffel.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'features', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_eiffel.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_eiffel.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'feature'
|
||||
\ }
|
||||
let type_eiffel.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'feature' : 'f'
|
||||
\ }
|
||||
let s:known_types.eiffel = type_eiffel
|
||||
" Erlang {{{3
|
||||
let type_erlang = tagbar#prototypes#typeinfo#new()
|
||||
let type_erlang.ctagstype = 'erlang'
|
||||
let type_erlang.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'macro definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'record definitions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_erlang.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_erlang.kind2scope = {
|
||||
\ 'm' : 'module'
|
||||
\ }
|
||||
let type_erlang.scope2kind = {
|
||||
\ 'module' : 'm'
|
||||
\ }
|
||||
let s:known_types.erlang = type_erlang
|
||||
" Flex {{{3
|
||||
" Vim doesn't support Flex out of the box, this is based on rough
|
||||
" guesses and probably requires
|
||||
" http://www.vim.org/scripts/script.php?script_id=2909
|
||||
" Improvements welcome!
|
||||
let type_as = tagbar#prototypes#typeinfo#new()
|
||||
let type_as.ctagstype = 'flex'
|
||||
let type_as.kinds = [
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'mxtags', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_as.sro = '.'
|
||||
let type_as.kind2scope = {
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_as.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let s:known_types.mxml = type_as
|
||||
let s:known_types.actionscript = type_as
|
||||
" Fortran {{{3
|
||||
let type_fortran = tagbar#prototypes#typeinfo#new()
|
||||
let type_fortran.ctagstype = 'fortran'
|
||||
let type_fortran.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'k', 'long' : 'components', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'derived types and structures', 'fold' : 0,
|
||||
\ 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'common blocks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'block data', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'entry points', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namelists', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_fortran.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_fortran.kind2scope = {
|
||||
\ 'm' : 'module',
|
||||
\ 'p' : 'program',
|
||||
\ 'f' : 'function',
|
||||
\ 's' : 'subroutine'
|
||||
\ }
|
||||
let type_fortran.scope2kind = {
|
||||
\ 'module' : 'm',
|
||||
\ 'program' : 'p',
|
||||
\ 'function' : 'f',
|
||||
\ 'subroutine' : 's'
|
||||
\ }
|
||||
let s:known_types.fortran = type_fortran
|
||||
" HTML {{{3
|
||||
let type_html = tagbar#prototypes#typeinfo#new()
|
||||
let type_html.ctagstype = 'html'
|
||||
if s:ctags_is_uctags
|
||||
let type_html.kinds = [
|
||||
\ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'h', 'long' : 'H1 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'H2 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'j', 'long' : 'H3 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ ]
|
||||
let s:known_types = tagbar#typedefs#uctags#init(supported_types)
|
||||
else
|
||||
let type_html.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'JavaScript functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types = tagbar#typedefs#ctags#init(supported_types)
|
||||
endif
|
||||
let s:known_types.html = type_html
|
||||
" Java {{{3
|
||||
let type_java = tagbar#prototypes#typeinfo#new()
|
||||
let type_java.ctagstype = 'java'
|
||||
let type_java.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_java.sro = '.'
|
||||
let type_java.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_java.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let s:known_types.java = type_java
|
||||
" JavaScript {{{3
|
||||
" jsctags/doctorjs will be used if available.
|
||||
let type_javascript = tagbar#prototypes#typeinfo#new()
|
||||
let type_javascript.ctagstype = 'javascript'
|
||||
|
||||
" Use jsctags/doctorjs if available
|
||||
let jsctags = s:CheckFTCtags('jsctags', 'javascript')
|
||||
if jsctags != ''
|
||||
let type_javascript = tagbar#prototypes#typeinfo#new()
|
||||
let type_javascript.ctagstype = 'javascript'
|
||||
let type_javascript.kinds = [
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
@@ -473,402 +143,8 @@ function! s:InitTypes() abort
|
||||
\ }
|
||||
let type_javascript.ctagsbin = jsctags
|
||||
let type_javascript.ctagsargs = '-f -'
|
||||
else
|
||||
let type_javascript.kinds = [
|
||||
\ {'short': 'v', 'long': 'global variables', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'c', 'long': 'classes', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'p', 'long': 'properties', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'm', 'long': 'methods', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1},
|
||||
\ ]
|
||||
let type_javascript.sro = '.'
|
||||
let type_javascript.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'method',
|
||||
\ 'p' : 'property',
|
||||
\ }
|
||||
let type_javascript.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f',
|
||||
\ }
|
||||
let s:known_types.javascript = type_javascript
|
||||
endif
|
||||
let s:known_types.javascript = type_javascript
|
||||
" Lisp {{{3
|
||||
let type_lisp = tagbar#prototypes#typeinfo#new()
|
||||
let type_lisp.ctagstype = 'lisp'
|
||||
let type_lisp.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.lisp = type_lisp
|
||||
let s:known_types.clojure = type_lisp
|
||||
" Lua {{{3
|
||||
let type_lua = tagbar#prototypes#typeinfo#new()
|
||||
let type_lua.ctagstype = 'lua'
|
||||
let type_lua.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.lua = type_lua
|
||||
" Make {{{3
|
||||
let type_make = tagbar#prototypes#typeinfo#new()
|
||||
let type_make.ctagstype = 'make'
|
||||
let type_make.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.make = type_make
|
||||
" Matlab {{{3
|
||||
let type_matlab = tagbar#prototypes#typeinfo#new()
|
||||
let type_matlab.ctagstype = 'matlab'
|
||||
let type_matlab.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.matlab = type_matlab
|
||||
" Ocaml {{{3
|
||||
let type_ocaml = tagbar#prototypes#typeinfo#new()
|
||||
let type_ocaml.ctagstype = 'ocaml'
|
||||
let type_ocaml.kinds = [
|
||||
\ {'short' : 'M', 'long' : 'modules or functors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'C', 'long' : 'constructors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'exceptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'type names', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'structure fields', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_ocaml.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_ocaml.kind2scope = {
|
||||
\ 'M' : 'Module',
|
||||
\ 'c' : 'class',
|
||||
\ 't' : 'type'
|
||||
\ }
|
||||
let type_ocaml.scope2kind = {
|
||||
\ 'Module' : 'M',
|
||||
\ 'class' : 'c',
|
||||
\ 'type' : 't'
|
||||
\ }
|
||||
let s:known_types.ocaml = type_ocaml
|
||||
" Pascal {{{3
|
||||
let type_pascal = tagbar#prototypes#typeinfo#new()
|
||||
let type_pascal.ctagstype = 'pascal'
|
||||
let type_pascal.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.pascal = type_pascal
|
||||
" Perl {{{3
|
||||
let type_perl = tagbar#prototypes#typeinfo#new()
|
||||
let type_perl.ctagstype = 'perl'
|
||||
let type_perl.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'formats', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.perl = type_perl
|
||||
" PHP {{{3
|
||||
let type_php = tagbar#prototypes#typeinfo#new()
|
||||
let type_php.ctagstype = 'php'
|
||||
let type_php.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.php = type_php
|
||||
" Python {{{3
|
||||
let type_python = tagbar#prototypes#typeinfo#new()
|
||||
let type_python.ctagstype = 'python'
|
||||
let type_python.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_python.sro = '.'
|
||||
let type_python.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'function'
|
||||
\ }
|
||||
let type_python.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f'
|
||||
\ }
|
||||
if s:ctags_is_uctags
|
||||
" Universal Ctags treats member functions differently from normal
|
||||
" functions
|
||||
let type_python.kind2scope.m = 'member'
|
||||
let type_python.scope2kind.member = 'm'
|
||||
endif
|
||||
let s:known_types.python = type_python
|
||||
let s:known_types.pyrex = type_python
|
||||
let s:known_types.cython = type_python
|
||||
" REXX {{{3
|
||||
let type_rexx = tagbar#prototypes#typeinfo#new()
|
||||
let type_rexx.ctagstype = 'rexx'
|
||||
let type_rexx.kinds = [
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.rexx = type_rexx
|
||||
" Ruby {{{3
|
||||
let type_ruby = tagbar#prototypes#typeinfo#new()
|
||||
let type_ruby.ctagstype = 'ruby'
|
||||
let type_ruby.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'singleton methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_ruby.sro = '.'
|
||||
let type_ruby.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'm' : 'class',
|
||||
\ 'f' : 'class'
|
||||
\ }
|
||||
let type_ruby.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let s:known_types.ruby = type_ruby
|
||||
" Scheme {{{3
|
||||
let type_scheme = tagbar#prototypes#typeinfo#new()
|
||||
let type_scheme.ctagstype = 'scheme'
|
||||
let type_scheme.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.scheme = type_scheme
|
||||
let s:known_types.racket = type_scheme
|
||||
" Shell script {{{3
|
||||
let type_sh = tagbar#prototypes#typeinfo#new()
|
||||
let type_sh.ctagstype = 'sh'
|
||||
let type_sh.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.sh = type_sh
|
||||
let s:known_types.csh = type_sh
|
||||
let s:known_types.zsh = type_sh
|
||||
" SLang {{{3
|
||||
let type_slang = tagbar#prototypes#typeinfo#new()
|
||||
let type_slang.ctagstype = 'slang'
|
||||
let type_slang.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.slang = type_slang
|
||||
" SML {{{3
|
||||
let type_sml = tagbar#prototypes#typeinfo#new()
|
||||
let type_sml.ctagstype = 'sml'
|
||||
let type_sml.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'exception declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'functor definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'signature declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'r', 'long' : 'structure declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'value bindings', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let s:known_types.sml = type_sml
|
||||
" SQL {{{3
|
||||
" The SQL ctags parser seems to be buggy for me, so this just uses the
|
||||
" normal kinds even though scopes should be available. Improvements
|
||||
" welcome!
|
||||
let type_sql = tagbar#prototypes#typeinfo#new()
|
||||
let type_sql.ctagstype = 'sql'
|
||||
let type_sql.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'prototypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'cursors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'record fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'L', 'long' : 'block label', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'triggers', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'indexes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'U', 'long' : 'publications', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'R', 'long' : 'services', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'D', 'long' : 'domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'V', 'long' : 'views', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'synonyms', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'MobiLink Table Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'y', 'long' : 'MobiLink Conn Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'z', 'long' : 'MobiLink Properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.sql = type_sql
|
||||
" Tcl {{{3
|
||||
let type_tcl = tagbar#prototypes#typeinfo#new()
|
||||
let type_tcl.ctagstype = 'tcl'
|
||||
let type_tcl.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.tcl = type_tcl
|
||||
" LaTeX {{{3
|
||||
let type_tex = tagbar#prototypes#typeinfo#new()
|
||||
let type_tex.ctagstype = 'tex'
|
||||
let type_tex.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'includes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'parts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'chapters', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'subsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'subsubsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'G', 'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_tex.sro = '""'
|
||||
let type_tex.kind2scope = {
|
||||
\ 'p' : 'part',
|
||||
\ 'c' : 'chapter',
|
||||
\ 's' : 'section',
|
||||
\ 'u' : 'subsection',
|
||||
\ 'b' : 'subsubsection'
|
||||
\ }
|
||||
let type_tex.scope2kind = {
|
||||
\ 'part' : 'p',
|
||||
\ 'chapter' : 'c',
|
||||
\ 'section' : 's',
|
||||
\ 'subsection' : 'u',
|
||||
\ 'subsubsection' : 'b'
|
||||
\ }
|
||||
let type_tex.sort = 0
|
||||
let s:known_types.tex = type_tex
|
||||
" Vala {{{3
|
||||
" Vala is supported by the ctags fork provided by Anjuta, so only add the
|
||||
" type if the fork is used to prevent error messages otherwise
|
||||
if has_key(s:ctags_types, 'vala') || executable('anjuta-tags')
|
||||
let type_vala = tagbar#prototypes#typeinfo#new()
|
||||
let type_vala.ctagstype = 'vala'
|
||||
let type_vala.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'Enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'Enumeration values', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'Structures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'Interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'Delegates', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'Classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'Properties', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'Fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'Methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'Error domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'Error codes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'S', 'long' : 'Signals', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vala.sro = '.'
|
||||
" 'enum' doesn't seem to be used as a scope, but it can't hurt to have
|
||||
" it here
|
||||
let type_vala.kind2scope = {
|
||||
\ 's' : 'struct',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 'e' : 'enum'
|
||||
\ }
|
||||
let type_vala.scope2kind = {
|
||||
\ 'struct' : 's',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'enum' : 'e'
|
||||
\ }
|
||||
let s:known_types.vala = type_vala
|
||||
endif
|
||||
if !has_key(s:ctags_types, 'vala') && executable('anjuta-tags')
|
||||
let s:known_types.vala.ctagsbin = 'anjuta-tags'
|
||||
endif
|
||||
" Vera {{{3
|
||||
" Why are variables 'virtual'?
|
||||
let type_vera = tagbar#prototypes#typeinfo#new()
|
||||
let type_vera.ctagstype = 'vera'
|
||||
let type_vera.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vera.sro = '.' " Nesting doesn't seem to be possible
|
||||
let type_vera.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'c' : 'class',
|
||||
\ 'v' : 'virtual'
|
||||
\ }
|
||||
let type_vera.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'class' : 'c',
|
||||
\ 'virtual' : 'v'
|
||||
\ }
|
||||
let s:known_types.vera = type_vera
|
||||
" Verilog {{{3
|
||||
let type_verilog = tagbar#prototypes#typeinfo#new()
|
||||
let type_verilog.ctagstype = 'verilog'
|
||||
let type_verilog.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'net data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'register data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.verilog = type_verilog
|
||||
" VHDL {{{3
|
||||
" The VHDL ctags parser unfortunately doesn't generate proper scopes
|
||||
let type_vhdl = tagbar#prototypes#typeinfo#new()
|
||||
let type_vhdl.ctagstype = 'vhdl'
|
||||
let type_vhdl.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'records', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'entities', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.vhdl = type_vhdl
|
||||
" Vim {{{3
|
||||
let type_vim = tagbar#prototypes#typeinfo#new()
|
||||
let type_vim.ctagstype = 'vim'
|
||||
let type_vim.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'vimball filenames', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'autocommand groups', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'commands', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'maps', 'fold' : 1, 'stl' : 0}
|
||||
\ ]
|
||||
let s:known_types.vim = type_vim
|
||||
" YACC {{{3
|
||||
let type_yacc = tagbar#prototypes#typeinfo#new()
|
||||
let type_yacc.ctagstype = 'yacc'
|
||||
let type_yacc.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let s:known_types.yacc = type_yacc
|
||||
" }}}3
|
||||
|
||||
for [type, typeinfo] in items(s:known_types)
|
||||
let typeinfo.ftype = type
|
||||
endfor
|
||||
|
||||
for typeinfo in values(s:known_types)
|
||||
call typeinfo.createKinddict()
|
||||
endfor
|
||||
|
||||
call s:LoadUserTypeDefs()
|
||||
|
||||
@@ -1288,13 +564,14 @@ function! s:GetSupportedFiletypes() abort
|
||||
|
||||
let types = split(ctags_output, '\n\+')
|
||||
|
||||
let supported_types = {}
|
||||
for type in types
|
||||
if match(type, '\[disabled\]') == -1
|
||||
let s:ctags_types[tolower(type)] = 1
|
||||
let supported_types[tolower(type)] = 1
|
||||
endif
|
||||
endfor
|
||||
|
||||
let s:checked_ctags_types = 1
|
||||
return supported_types
|
||||
endfunction
|
||||
|
||||
" Known files {{{1
|
||||
|
||||
722
autoload/tagbar/typedefs/ctags.vim
Normal file
722
autoload/tagbar/typedefs/ctags.vim
Normal file
@@ -0,0 +1,722 @@
|
||||
" Type definitions for standard Exuberant Ctags
|
||||
|
||||
function! tagbar#typedefs#ctags#init(supported_types) abort
|
||||
let types = {}
|
||||
|
||||
" Ant {{{1
|
||||
let type_ant = tagbar#prototypes#typeinfo#new()
|
||||
let type_ant.ctagstype = 'ant'
|
||||
let type_ant.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'projects', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.ant = type_ant
|
||||
" Asm {{{1
|
||||
let type_asm = tagbar#prototypes#typeinfo#new()
|
||||
let type_asm.ctagstype = 'asm'
|
||||
let type_asm.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'defines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.asm = type_asm
|
||||
" ASP {{{1
|
||||
let type_aspvbs = tagbar#prototypes#typeinfo#new()
|
||||
let type_aspvbs.ctagstype = 'asp'
|
||||
let type_aspvbs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.aspvbs = type_aspvbs
|
||||
" Asymptote {{{1
|
||||
" Asymptote gets parsed well using filetype = c
|
||||
let type_asy = tagbar#prototypes#typeinfo#new()
|
||||
let type_asy.ctagstype = 'c'
|
||||
let type_asy.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_asy.sro = '::'
|
||||
let type_asy.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_asy.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.asy = type_asy
|
||||
" Awk {{{1
|
||||
let type_awk = tagbar#prototypes#typeinfo#new()
|
||||
let type_awk.ctagstype = 'awk'
|
||||
let type_awk.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.awk = type_awk
|
||||
" Basic {{{1
|
||||
let type_basic = tagbar#prototypes#typeinfo#new()
|
||||
let type_basic.ctagstype = 'basic'
|
||||
let type_basic.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.basic = type_basic
|
||||
" BETA {{{1
|
||||
let type_beta = tagbar#prototypes#typeinfo#new()
|
||||
let type_beta.ctagstype = 'beta'
|
||||
let type_beta.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'fragments', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'slots', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'patterns', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.beta = type_beta
|
||||
" C {{{1
|
||||
let type_c = tagbar#prototypes#typeinfo#new()
|
||||
let type_c.ctagstype = 'c'
|
||||
let type_c.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_c.sro = '::'
|
||||
let type_c.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_c.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.c = type_c
|
||||
" C++ {{{1
|
||||
let type_cpp = tagbar#prototypes#typeinfo#new()
|
||||
let type_cpp.ctagstype = 'c++'
|
||||
let type_cpp.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_cpp.sro = '::'
|
||||
let type_cpp.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'n' : 'namespace',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_cpp.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'namespace' : 'n',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.cpp = type_cpp
|
||||
let types.cuda = type_cpp
|
||||
" C# {{{1
|
||||
let type_cs = tagbar#prototypes#typeinfo#new()
|
||||
let type_cs.ctagstype = 'c#'
|
||||
let type_cs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_cs.sro = '.'
|
||||
let type_cs.kind2scope = {
|
||||
\ 'n' : 'namespace',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'g' : 'enum'
|
||||
\ }
|
||||
let type_cs.scope2kind = {
|
||||
\ 'namespace' : 'n',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'enum' : 'g'
|
||||
\ }
|
||||
let types.cs = type_cs
|
||||
" COBOL {{{1
|
||||
let type_cobol = tagbar#prototypes#typeinfo#new()
|
||||
let type_cobol.ctagstype = 'cobol'
|
||||
let type_cobol.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'data items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'file descriptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'group items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'program ids', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.cobol = type_cobol
|
||||
" DOS Batch {{{1
|
||||
let type_dosbatch = tagbar#prototypes#typeinfo#new()
|
||||
let type_dosbatch.ctagstype = 'dosbatch'
|
||||
let type_dosbatch.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.dosbatch = type_dosbatch
|
||||
" Eiffel {{{1
|
||||
let type_eiffel = tagbar#prototypes#typeinfo#new()
|
||||
let type_eiffel.ctagstype = 'eiffel'
|
||||
let type_eiffel.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'features', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_eiffel.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_eiffel.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'feature'
|
||||
\ }
|
||||
let type_eiffel.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'feature' : 'f'
|
||||
\ }
|
||||
let types.eiffel = type_eiffel
|
||||
" Erlang {{{1
|
||||
let type_erlang = tagbar#prototypes#typeinfo#new()
|
||||
let type_erlang.ctagstype = 'erlang'
|
||||
let type_erlang.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'macro definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'record definitions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_erlang.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_erlang.kind2scope = {
|
||||
\ 'm' : 'module'
|
||||
\ }
|
||||
let type_erlang.scope2kind = {
|
||||
\ 'module' : 'm'
|
||||
\ }
|
||||
let types.erlang = type_erlang
|
||||
" Flex {{{1
|
||||
" Vim doesn't support Flex out of the box, this is based on rough
|
||||
" guesses and probably requires
|
||||
" http://www.vim.org/scripts/script.php?script_id=2909
|
||||
" Improvements welcome!
|
||||
let type_as = tagbar#prototypes#typeinfo#new()
|
||||
let type_as.ctagstype = 'flex'
|
||||
let type_as.kinds = [
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'mxtags', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_as.sro = '.'
|
||||
let type_as.kind2scope = {
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_as.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.mxml = type_as
|
||||
let types.actionscript = type_as
|
||||
" Fortran {{{1
|
||||
let type_fortran = tagbar#prototypes#typeinfo#new()
|
||||
let type_fortran.ctagstype = 'fortran'
|
||||
let type_fortran.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'k', 'long' : 'components', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'derived types and structures', 'fold' : 0,
|
||||
\ 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'common blocks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'block data', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'entry points', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namelists', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_fortran.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_fortran.kind2scope = {
|
||||
\ 'm' : 'module',
|
||||
\ 'p' : 'program',
|
||||
\ 'f' : 'function',
|
||||
\ 's' : 'subroutine'
|
||||
\ }
|
||||
let type_fortran.scope2kind = {
|
||||
\ 'module' : 'm',
|
||||
\ 'program' : 'p',
|
||||
\ 'function' : 'f',
|
||||
\ 'subroutine' : 's'
|
||||
\ }
|
||||
let types.fortran = type_fortran
|
||||
" HTML {{{1
|
||||
let type_html = tagbar#prototypes#typeinfo#new()
|
||||
let type_html.ctagstype = 'html'
|
||||
let type_html.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'JavaScript functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.html = type_html
|
||||
" Java {{{1
|
||||
let type_java = tagbar#prototypes#typeinfo#new()
|
||||
let type_java.ctagstype = 'java'
|
||||
let type_java.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_java.sro = '.'
|
||||
let type_java.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_java.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.java = type_java
|
||||
" JavaScript {{{1
|
||||
let type_javascript = tagbar#prototypes#typeinfo#new()
|
||||
let type_javascript.ctagstype = 'javascript'
|
||||
let type_javascript.kinds = [
|
||||
\ {'short': 'v', 'long': 'global variables', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'c', 'long': 'classes', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'p', 'long': 'properties', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'm', 'long': 'methods', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1},
|
||||
\ ]
|
||||
let type_javascript.sro = '.'
|
||||
let type_javascript.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'method',
|
||||
\ 'p' : 'property',
|
||||
\ }
|
||||
let type_javascript.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f',
|
||||
\ }
|
||||
let types.javascript = type_javascript
|
||||
" Lisp {{{1
|
||||
let type_lisp = tagbar#prototypes#typeinfo#new()
|
||||
let type_lisp.ctagstype = 'lisp'
|
||||
let type_lisp.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lisp = type_lisp
|
||||
let types.clojure = type_lisp
|
||||
" Lua {{{1
|
||||
let type_lua = tagbar#prototypes#typeinfo#new()
|
||||
let type_lua.ctagstype = 'lua'
|
||||
let type_lua.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lua = type_lua
|
||||
" Make {{{1
|
||||
let type_make = tagbar#prototypes#typeinfo#new()
|
||||
let type_make.ctagstype = 'make'
|
||||
let type_make.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.make = type_make
|
||||
" Matlab {{{1
|
||||
let type_matlab = tagbar#prototypes#typeinfo#new()
|
||||
let type_matlab.ctagstype = 'matlab'
|
||||
let type_matlab.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.matlab = type_matlab
|
||||
" Ocaml {{{1
|
||||
let type_ocaml = tagbar#prototypes#typeinfo#new()
|
||||
let type_ocaml.ctagstype = 'ocaml'
|
||||
let type_ocaml.kinds = [
|
||||
\ {'short' : 'M', 'long' : 'modules or functors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'C', 'long' : 'constructors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'exceptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'type names', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'structure fields', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_ocaml.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_ocaml.kind2scope = {
|
||||
\ 'M' : 'Module',
|
||||
\ 'c' : 'class',
|
||||
\ 't' : 'type'
|
||||
\ }
|
||||
let type_ocaml.scope2kind = {
|
||||
\ 'Module' : 'M',
|
||||
\ 'class' : 'c',
|
||||
\ 'type' : 't'
|
||||
\ }
|
||||
let types.ocaml = type_ocaml
|
||||
" Pascal {{{1
|
||||
let type_pascal = tagbar#prototypes#typeinfo#new()
|
||||
let type_pascal.ctagstype = 'pascal'
|
||||
let type_pascal.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.pascal = type_pascal
|
||||
" Perl {{{1
|
||||
let type_perl = tagbar#prototypes#typeinfo#new()
|
||||
let type_perl.ctagstype = 'perl'
|
||||
let type_perl.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'formats', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.perl = type_perl
|
||||
" PHP {{{1
|
||||
let type_php = tagbar#prototypes#typeinfo#new()
|
||||
let type_php.ctagstype = 'php'
|
||||
let type_php.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.php = type_php
|
||||
" Python {{{1
|
||||
let type_python = tagbar#prototypes#typeinfo#new()
|
||||
let type_python.ctagstype = 'python'
|
||||
let type_python.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_python.sro = '.'
|
||||
let type_python.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'function'
|
||||
\ }
|
||||
let type_python.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f'
|
||||
\ }
|
||||
let types.python = type_python
|
||||
let types.pyrex = type_python
|
||||
let types.cython = type_python
|
||||
" REXX {{{1
|
||||
let type_rexx = tagbar#prototypes#typeinfo#new()
|
||||
let type_rexx.ctagstype = 'rexx'
|
||||
let type_rexx.kinds = [
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.rexx = type_rexx
|
||||
" Ruby {{{1
|
||||
let type_ruby = tagbar#prototypes#typeinfo#new()
|
||||
let type_ruby.ctagstype = 'ruby'
|
||||
let type_ruby.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'singleton methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_ruby.sro = '.'
|
||||
let type_ruby.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'm' : 'class',
|
||||
\ 'f' : 'class'
|
||||
\ }
|
||||
let type_ruby.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.ruby = type_ruby
|
||||
" Scheme {{{1
|
||||
let type_scheme = tagbar#prototypes#typeinfo#new()
|
||||
let type_scheme.ctagstype = 'scheme'
|
||||
let type_scheme.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.scheme = type_scheme
|
||||
let types.racket = type_scheme
|
||||
" Shell script {{{1
|
||||
let type_sh = tagbar#prototypes#typeinfo#new()
|
||||
let type_sh.ctagstype = 'sh'
|
||||
let type_sh.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sh = type_sh
|
||||
let types.csh = type_sh
|
||||
let types.zsh = type_sh
|
||||
" SLang {{{1
|
||||
let type_slang = tagbar#prototypes#typeinfo#new()
|
||||
let type_slang.ctagstype = 'slang'
|
||||
let type_slang.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.slang = type_slang
|
||||
" SML {{{1
|
||||
let type_sml = tagbar#prototypes#typeinfo#new()
|
||||
let type_sml.ctagstype = 'sml'
|
||||
let type_sml.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'exception declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'functor definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'signature declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'r', 'long' : 'structure declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'value bindings', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let types.sml = type_sml
|
||||
" SQL {{{1
|
||||
" The SQL ctags parser seems to be buggy for me, so this just uses the
|
||||
" normal kinds even though scopes should be available. Improvements
|
||||
" welcome!
|
||||
let type_sql = tagbar#prototypes#typeinfo#new()
|
||||
let type_sql.ctagstype = 'sql'
|
||||
let type_sql.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'prototypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'cursors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'record fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'L', 'long' : 'block label', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'triggers', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'indexes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'U', 'long' : 'publications', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'R', 'long' : 'services', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'D', 'long' : 'domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'V', 'long' : 'views', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'synonyms', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'MobiLink Table Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'y', 'long' : 'MobiLink Conn Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'z', 'long' : 'MobiLink Properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sql = type_sql
|
||||
" Tcl {{{1
|
||||
let type_tcl = tagbar#prototypes#typeinfo#new()
|
||||
let type_tcl.ctagstype = 'tcl'
|
||||
let type_tcl.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.tcl = type_tcl
|
||||
" LaTeX {{{1
|
||||
let type_tex = tagbar#prototypes#typeinfo#new()
|
||||
let type_tex.ctagstype = 'tex'
|
||||
let type_tex.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'includes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'parts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'chapters', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'subsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'subsubsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'G', 'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_tex.sro = '""'
|
||||
let type_tex.kind2scope = {
|
||||
\ 'p' : 'part',
|
||||
\ 'c' : 'chapter',
|
||||
\ 's' : 'section',
|
||||
\ 'u' : 'subsection',
|
||||
\ 'b' : 'subsubsection'
|
||||
\ }
|
||||
let type_tex.scope2kind = {
|
||||
\ 'part' : 'p',
|
||||
\ 'chapter' : 'c',
|
||||
\ 'section' : 's',
|
||||
\ 'subsection' : 'u',
|
||||
\ 'subsubsection' : 'b'
|
||||
\ }
|
||||
let type_tex.sort = 0
|
||||
let types.tex = type_tex
|
||||
" Vala {{{1
|
||||
" Vala is supported by the ctags fork provided by Anjuta, so only add the
|
||||
" type if the fork is used to prevent error messages otherwise
|
||||
if has_key(a:supported_types, 'vala') || executable('anjuta-tags')
|
||||
let type_vala = tagbar#prototypes#typeinfo#new()
|
||||
let type_vala.ctagstype = 'vala'
|
||||
let type_vala.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'Enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'Enumeration values', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'Structures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'Interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'Delegates', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'Classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'Properties', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'Fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'Methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'Error domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'Error codes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'S', 'long' : 'Signals', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vala.sro = '.'
|
||||
" 'enum' doesn't seem to be used as a scope, but it can't hurt to have
|
||||
" it here
|
||||
let type_vala.kind2scope = {
|
||||
\ 's' : 'struct',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 'e' : 'enum'
|
||||
\ }
|
||||
let type_vala.scope2kind = {
|
||||
\ 'struct' : 's',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'enum' : 'e'
|
||||
\ }
|
||||
let types.vala = type_vala
|
||||
endif
|
||||
if !has_key(a:supported_types, 'vala') && executable('anjuta-tags')
|
||||
let types.vala.ctagsbin = 'anjuta-tags'
|
||||
endif
|
||||
" Vera {{{1
|
||||
" Why are variables 'virtual'?
|
||||
let type_vera = tagbar#prototypes#typeinfo#new()
|
||||
let type_vera.ctagstype = 'vera'
|
||||
let type_vera.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vera.sro = '.' " Nesting doesn't seem to be possible
|
||||
let type_vera.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'c' : 'class',
|
||||
\ 'v' : 'virtual'
|
||||
\ }
|
||||
let type_vera.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'class' : 'c',
|
||||
\ 'virtual' : 'v'
|
||||
\ }
|
||||
let types.vera = type_vera
|
||||
" Verilog {{{1
|
||||
let type_verilog = tagbar#prototypes#typeinfo#new()
|
||||
let type_verilog.ctagstype = 'verilog'
|
||||
let type_verilog.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'net data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'register data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.verilog = type_verilog
|
||||
" VHDL {{{1
|
||||
" The VHDL ctags parser unfortunately doesn't generate proper scopes
|
||||
let type_vhdl = tagbar#prototypes#typeinfo#new()
|
||||
let type_vhdl.ctagstype = 'vhdl'
|
||||
let type_vhdl.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'records', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'entities', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.vhdl = type_vhdl
|
||||
" Vim {{{1
|
||||
let type_vim = tagbar#prototypes#typeinfo#new()
|
||||
let type_vim.ctagstype = 'vim'
|
||||
let type_vim.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'vimball filenames', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'autocommand groups', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'commands', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'maps', 'fold' : 1, 'stl' : 0}
|
||||
\ ]
|
||||
let types.vim = type_vim
|
||||
" YACC {{{1
|
||||
let type_yacc = tagbar#prototypes#typeinfo#new()
|
||||
let type_yacc.ctagstype = 'yacc'
|
||||
let type_yacc.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.yacc = type_yacc
|
||||
" }}}1
|
||||
|
||||
for [type, typeinfo] in items(types)
|
||||
let typeinfo.ftype = type
|
||||
endfor
|
||||
|
||||
for typeinfo in values(types)
|
||||
call typeinfo.createKinddict()
|
||||
endfor
|
||||
|
||||
return types
|
||||
endfunction
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
726
autoload/tagbar/typedefs/uctags.vim
Normal file
726
autoload/tagbar/typedefs/uctags.vim
Normal file
@@ -0,0 +1,726 @@
|
||||
" Type definitions for Universal Ctags
|
||||
|
||||
function! tagbar#typedefs#uctags#init(supported_types) abort
|
||||
let types = {}
|
||||
|
||||
" Ant {{{1
|
||||
let type_ant = tagbar#prototypes#typeinfo#new()
|
||||
let type_ant.ctagstype = 'ant'
|
||||
let type_ant.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'projects', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.ant = type_ant
|
||||
" Asm {{{1
|
||||
let type_asm = tagbar#prototypes#typeinfo#new()
|
||||
let type_asm.ctagstype = 'asm'
|
||||
let type_asm.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'defines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.asm = type_asm
|
||||
" ASP {{{1
|
||||
let type_aspvbs = tagbar#prototypes#typeinfo#new()
|
||||
let type_aspvbs.ctagstype = 'asp'
|
||||
let type_aspvbs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.aspvbs = type_aspvbs
|
||||
" Asymptote {{{1
|
||||
" Asymptote gets parsed well using filetype = c
|
||||
let type_asy = tagbar#prototypes#typeinfo#new()
|
||||
let type_asy.ctagstype = 'c'
|
||||
let type_asy.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_asy.sro = '::'
|
||||
let type_asy.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_asy.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.asy = type_asy
|
||||
" Awk {{{1
|
||||
let type_awk = tagbar#prototypes#typeinfo#new()
|
||||
let type_awk.ctagstype = 'awk'
|
||||
let type_awk.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.awk = type_awk
|
||||
" Basic {{{1
|
||||
let type_basic = tagbar#prototypes#typeinfo#new()
|
||||
let type_basic.ctagstype = 'basic'
|
||||
let type_basic.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.basic = type_basic
|
||||
" BETA {{{1
|
||||
let type_beta = tagbar#prototypes#typeinfo#new()
|
||||
let type_beta.ctagstype = 'beta'
|
||||
let type_beta.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'fragments', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'slots', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'patterns', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.beta = type_beta
|
||||
" C {{{1
|
||||
let type_c = tagbar#prototypes#typeinfo#new()
|
||||
let type_c.ctagstype = 'c'
|
||||
let type_c.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_c.sro = '::'
|
||||
let type_c.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_c.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.c = type_c
|
||||
" C++ {{{1
|
||||
let type_cpp = tagbar#prototypes#typeinfo#new()
|
||||
let type_cpp.ctagstype = 'c++'
|
||||
let type_cpp.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_cpp.sro = '::'
|
||||
let type_cpp.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'n' : 'namespace',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'u' : 'union'
|
||||
\ }
|
||||
let type_cpp.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'namespace' : 'n',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'union' : 'u'
|
||||
\ }
|
||||
let types.cpp = type_cpp
|
||||
let types.cuda = type_cpp
|
||||
" C# {{{1
|
||||
let type_cs = tagbar#prototypes#typeinfo#new()
|
||||
let type_cs.ctagstype = 'c#'
|
||||
let type_cs.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_cs.sro = '.'
|
||||
let type_cs.kind2scope = {
|
||||
\ 'n' : 'namespace',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 's' : 'struct',
|
||||
\ 'g' : 'enum'
|
||||
\ }
|
||||
let type_cs.scope2kind = {
|
||||
\ 'namespace' : 'n',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'struct' : 's',
|
||||
\ 'enum' : 'g'
|
||||
\ }
|
||||
let types.cs = type_cs
|
||||
" COBOL {{{1
|
||||
let type_cobol = tagbar#prototypes#typeinfo#new()
|
||||
let type_cobol.ctagstype = 'cobol'
|
||||
let type_cobol.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'data items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'file descriptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'g', 'long' : 'group items', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'program ids', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.cobol = type_cobol
|
||||
" DOS Batch {{{1
|
||||
let type_dosbatch = tagbar#prototypes#typeinfo#new()
|
||||
let type_dosbatch.ctagstype = 'dosbatch'
|
||||
let type_dosbatch.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.dosbatch = type_dosbatch
|
||||
" Eiffel {{{1
|
||||
let type_eiffel = tagbar#prototypes#typeinfo#new()
|
||||
let type_eiffel.ctagstype = 'eiffel'
|
||||
let type_eiffel.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'features', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_eiffel.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_eiffel.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'feature'
|
||||
\ }
|
||||
let type_eiffel.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'feature' : 'f'
|
||||
\ }
|
||||
let types.eiffel = type_eiffel
|
||||
" Erlang {{{1
|
||||
let type_erlang = tagbar#prototypes#typeinfo#new()
|
||||
let type_erlang.ctagstype = 'erlang'
|
||||
let type_erlang.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'macro definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'record definitions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_erlang.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_erlang.kind2scope = {
|
||||
\ 'm' : 'module'
|
||||
\ }
|
||||
let type_erlang.scope2kind = {
|
||||
\ 'module' : 'm'
|
||||
\ }
|
||||
let types.erlang = type_erlang
|
||||
" Flex {{{1
|
||||
" Vim doesn't support Flex out of the box, this is based on rough
|
||||
" guesses and probably requires
|
||||
" http://www.vim.org/scripts/script.php?script_id=2909
|
||||
" Improvements welcome!
|
||||
let type_as = tagbar#prototypes#typeinfo#new()
|
||||
let type_as.ctagstype = 'flex'
|
||||
let type_as.kinds = [
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'mxtags', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_as.sro = '.'
|
||||
let type_as.kind2scope = {
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_as.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.mxml = type_as
|
||||
let types.actionscript = type_as
|
||||
" Fortran {{{1
|
||||
let type_fortran = tagbar#prototypes#typeinfo#new()
|
||||
let type_fortran.ctagstype = 'fortran'
|
||||
let type_fortran.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'k', 'long' : 'components', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'derived types and structures', 'fold' : 0,
|
||||
\ 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'common blocks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'block data', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'entry points', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namelists', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_fortran.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_fortran.kind2scope = {
|
||||
\ 'm' : 'module',
|
||||
\ 'p' : 'program',
|
||||
\ 'f' : 'function',
|
||||
\ 's' : 'subroutine'
|
||||
\ }
|
||||
let type_fortran.scope2kind = {
|
||||
\ 'module' : 'm',
|
||||
\ 'program' : 'p',
|
||||
\ 'function' : 'f',
|
||||
\ 'subroutine' : 's'
|
||||
\ }
|
||||
let types.fortran = type_fortran
|
||||
" HTML {{{1
|
||||
let type_html = tagbar#prototypes#typeinfo#new()
|
||||
let type_html.ctagstype = 'html'
|
||||
let type_html.kinds = [
|
||||
\ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'h', 'long' : 'H1 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'H2 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'j', 'long' : 'H3 headings', 'fold' : 0, 'stl' : 1},
|
||||
\ ]
|
||||
let types.html = type_html
|
||||
" Java {{{1
|
||||
let type_java = tagbar#prototypes#typeinfo#new()
|
||||
let type_java.ctagstype = 'java'
|
||||
let type_java.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_java.sro = '.'
|
||||
let type_java.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class'
|
||||
\ }
|
||||
let type_java.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.java = type_java
|
||||
" JavaScript {{{1
|
||||
let type_javascript = tagbar#prototypes#typeinfo#new()
|
||||
let type_javascript.ctagstype = 'javascript'
|
||||
let type_javascript.kinds = [
|
||||
\ {'short': 'v', 'long': 'global variables', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'c', 'long': 'classes', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'p', 'long': 'properties', 'fold': 0, 'stl': 0},
|
||||
\ {'short': 'm', 'long': 'methods', 'fold': 0, 'stl': 1},
|
||||
\ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1},
|
||||
\ ]
|
||||
let type_javascript.sro = '.'
|
||||
let type_javascript.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'method',
|
||||
\ 'p' : 'property',
|
||||
\ }
|
||||
let type_javascript.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f',
|
||||
\ }
|
||||
let types.javascript = type_javascript
|
||||
" Lisp {{{1
|
||||
let type_lisp = tagbar#prototypes#typeinfo#new()
|
||||
let type_lisp.ctagstype = 'lisp'
|
||||
let type_lisp.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lisp = type_lisp
|
||||
let types.clojure = type_lisp
|
||||
" Lua {{{1
|
||||
let type_lua = tagbar#prototypes#typeinfo#new()
|
||||
let type_lua.ctagstype = 'lua'
|
||||
let type_lua.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.lua = type_lua
|
||||
" Make {{{1
|
||||
let type_make = tagbar#prototypes#typeinfo#new()
|
||||
let type_make.ctagstype = 'make'
|
||||
let type_make.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.make = type_make
|
||||
" Matlab {{{1
|
||||
let type_matlab = tagbar#prototypes#typeinfo#new()
|
||||
let type_matlab.ctagstype = 'matlab'
|
||||
let type_matlab.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.matlab = type_matlab
|
||||
" Ocaml {{{1
|
||||
let type_ocaml = tagbar#prototypes#typeinfo#new()
|
||||
let type_ocaml.ctagstype = 'ocaml'
|
||||
let type_ocaml.kinds = [
|
||||
\ {'short' : 'M', 'long' : 'modules or functors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'C', 'long' : 'constructors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'exceptions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'type names', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'structure fields', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_ocaml.sro = '.' " Not sure, is nesting even possible?
|
||||
let type_ocaml.kind2scope = {
|
||||
\ 'M' : 'Module',
|
||||
\ 'c' : 'class',
|
||||
\ 't' : 'type'
|
||||
\ }
|
||||
let type_ocaml.scope2kind = {
|
||||
\ 'Module' : 'M',
|
||||
\ 'class' : 'c',
|
||||
\ 'type' : 't'
|
||||
\ }
|
||||
let types.ocaml = type_ocaml
|
||||
" Pascal {{{1
|
||||
let type_pascal = tagbar#prototypes#typeinfo#new()
|
||||
let type_pascal.ctagstype = 'pascal'
|
||||
let type_pascal.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.pascal = type_pascal
|
||||
" Perl {{{1
|
||||
let type_perl = tagbar#prototypes#typeinfo#new()
|
||||
let type_perl.ctagstype = 'perl'
|
||||
let type_perl.kinds = [
|
||||
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'formats', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.perl = type_perl
|
||||
" PHP {{{1
|
||||
let type_php = tagbar#prototypes#typeinfo#new()
|
||||
let type_php.ctagstype = 'php'
|
||||
let type_php.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.php = type_php
|
||||
" Python {{{1
|
||||
let type_python = tagbar#prototypes#typeinfo#new()
|
||||
let type_python.ctagstype = 'python'
|
||||
let type_python.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_python.sro = '.'
|
||||
let type_python.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'f' : 'function',
|
||||
\ 'm' : 'function'
|
||||
\ }
|
||||
let type_python.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'function' : 'f'
|
||||
\ }
|
||||
let type_python.kind2scope.m = 'member'
|
||||
let type_python.scope2kind.member = 'm'
|
||||
let types.python = type_python
|
||||
let types.pyrex = type_python
|
||||
let types.cython = type_python
|
||||
" REXX {{{1
|
||||
let type_rexx = tagbar#prototypes#typeinfo#new()
|
||||
let type_rexx.ctagstype = 'rexx'
|
||||
let type_rexx.kinds = [
|
||||
\ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.rexx = type_rexx
|
||||
" Ruby {{{1
|
||||
let type_ruby = tagbar#prototypes#typeinfo#new()
|
||||
let type_ruby.ctagstype = 'ruby'
|
||||
let type_ruby.kinds = [
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'singleton methods', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_ruby.sro = '.'
|
||||
let type_ruby.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'm' : 'class',
|
||||
\ 'f' : 'class'
|
||||
\ }
|
||||
let type_ruby.scope2kind = {
|
||||
\ 'class' : 'c'
|
||||
\ }
|
||||
let types.ruby = type_ruby
|
||||
" Scheme {{{1
|
||||
let type_scheme = tagbar#prototypes#typeinfo#new()
|
||||
let type_scheme.ctagstype = 'scheme'
|
||||
let type_scheme.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sets', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.scheme = type_scheme
|
||||
let types.racket = type_scheme
|
||||
" Shell script {{{1
|
||||
let type_sh = tagbar#prototypes#typeinfo#new()
|
||||
let type_sh.ctagstype = 'sh'
|
||||
let type_sh.kinds = [
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sh = type_sh
|
||||
let types.csh = type_sh
|
||||
let types.zsh = type_sh
|
||||
" SLang {{{1
|
||||
let type_slang = tagbar#prototypes#typeinfo#new()
|
||||
let type_slang.ctagstype = 'slang'
|
||||
let type_slang.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.slang = type_slang
|
||||
" SML {{{1
|
||||
let type_sml = tagbar#prototypes#typeinfo#new()
|
||||
let type_sml.ctagstype = 'sml'
|
||||
let type_sml.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'exception declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'functor definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'signature declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'r', 'long' : 'structure declarations', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'value bindings', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let types.sml = type_sml
|
||||
" SQL {{{1
|
||||
" The SQL ctags parser seems to be buggy for me, so this just uses the
|
||||
" normal kinds even though scopes should be available. Improvements
|
||||
" welcome!
|
||||
let type_sql = tagbar#prototypes#typeinfo#new()
|
||||
let type_sql.ctagstype = 'sql'
|
||||
let type_sql.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'prototypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'cursors', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'F', 'long' : 'record fields', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'L', 'long' : 'block label', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'triggers', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'indexes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'U', 'long' : 'publications', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'R', 'long' : 'services', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'D', 'long' : 'domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'V', 'long' : 'views', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'synonyms', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'x', 'long' : 'MobiLink Table Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'y', 'long' : 'MobiLink Conn Scripts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'z', 'long' : 'MobiLink Properties', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.sql = type_sql
|
||||
" Tcl {{{1
|
||||
let type_tcl = tagbar#prototypes#typeinfo#new()
|
||||
let type_tcl.ctagstype = 'tcl'
|
||||
let type_tcl.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.tcl = type_tcl
|
||||
" LaTeX {{{1
|
||||
let type_tex = tagbar#prototypes#typeinfo#new()
|
||||
let type_tex.ctagstype = 'tex'
|
||||
let type_tex.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'includes', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'parts', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'chapters', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'u', 'long' : 'subsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'b', 'long' : 'subsubsections', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'P', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'G', 'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 0}
|
||||
\ ]
|
||||
let type_tex.sro = '""'
|
||||
let type_tex.kind2scope = {
|
||||
\ 'p' : 'part',
|
||||
\ 'c' : 'chapter',
|
||||
\ 's' : 'section',
|
||||
\ 'u' : 'subsection',
|
||||
\ 'b' : 'subsubsection'
|
||||
\ }
|
||||
let type_tex.scope2kind = {
|
||||
\ 'part' : 'p',
|
||||
\ 'chapter' : 'c',
|
||||
\ 'section' : 's',
|
||||
\ 'subsection' : 'u',
|
||||
\ 'subsubsection' : 'b'
|
||||
\ }
|
||||
let type_tex.sort = 0
|
||||
let types.tex = type_tex
|
||||
" Vala {{{1
|
||||
" Vala is supported by the ctags fork provided by Anjuta, so only add the
|
||||
" type if the fork is used to prevent error messages otherwise
|
||||
if has_key(a:supported_types, 'vala') || executable('anjuta-tags')
|
||||
let type_vala = tagbar#prototypes#typeinfo#new()
|
||||
let type_vala.ctagstype = 'vala'
|
||||
let type_vala.kinds = [
|
||||
\ {'short' : 'e', 'long' : 'Enumerations', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'Enumeration values', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 's', 'long' : 'Structures', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'i', 'long' : 'Interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'd', 'long' : 'Delegates', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'Classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'Properties', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'Fields', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'Methods', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'E', 'long' : 'Error domains', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'Error codes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'S', 'long' : 'Signals', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vala.sro = '.'
|
||||
" 'enum' doesn't seem to be used as a scope, but it can't hurt to have
|
||||
" it here
|
||||
let type_vala.kind2scope = {
|
||||
\ 's' : 'struct',
|
||||
\ 'i' : 'interface',
|
||||
\ 'c' : 'class',
|
||||
\ 'e' : 'enum'
|
||||
\ }
|
||||
let type_vala.scope2kind = {
|
||||
\ 'struct' : 's',
|
||||
\ 'interface' : 'i',
|
||||
\ 'class' : 'c',
|
||||
\ 'enum' : 'e'
|
||||
\ }
|
||||
let types.vala = type_vala
|
||||
endif
|
||||
if !has_key(a:supported_types, 'vala') && executable('anjuta-tags')
|
||||
let types.vala.ctagsbin = 'anjuta-tags'
|
||||
endif
|
||||
" Vera {{{1
|
||||
" Why are variables 'virtual'?
|
||||
let type_vera = tagbar#prototypes#typeinfo#new()
|
||||
let type_vera.ctagstype = 'vera'
|
||||
let type_vera.kinds = [
|
||||
\ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let type_vera.sro = '.' " Nesting doesn't seem to be possible
|
||||
let type_vera.kind2scope = {
|
||||
\ 'g' : 'enum',
|
||||
\ 'c' : 'class',
|
||||
\ 'v' : 'virtual'
|
||||
\ }
|
||||
let type_vera.scope2kind = {
|
||||
\ 'enum' : 'g',
|
||||
\ 'class' : 'c',
|
||||
\ 'virtual' : 'v'
|
||||
\ }
|
||||
let types.vera = type_vera
|
||||
" Verilog {{{1
|
||||
let type_verilog = tagbar#prototypes#typeinfo#new()
|
||||
let type_verilog.ctagstype = 'verilog'
|
||||
let type_verilog.kinds = [
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'net data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'register data types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.verilog = type_verilog
|
||||
" VHDL {{{1
|
||||
" The VHDL ctags parser unfortunately doesn't generate proper scopes
|
||||
let type_vhdl = tagbar#prototypes#typeinfo#new()
|
||||
let type_vhdl.ctagstype = 'vhdl'
|
||||
let type_vhdl.kinds = [
|
||||
\ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'T', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'r', 'long' : 'records', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'e', 'long' : 'entities', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.vhdl = type_vhdl
|
||||
" Vim {{{1
|
||||
let type_vim = tagbar#prototypes#typeinfo#new()
|
||||
let type_vim.ctagstype = 'vim'
|
||||
let type_vim.kinds = [
|
||||
\ {'short' : 'n', 'long' : 'vimball filenames', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'a', 'long' : 'autocommand groups', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'commands', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'm', 'long' : 'maps', 'fold' : 1, 'stl' : 0}
|
||||
\ ]
|
||||
let types.vim = type_vim
|
||||
" YACC {{{1
|
||||
let type_yacc = tagbar#prototypes#typeinfo#new()
|
||||
let type_yacc.ctagstype = 'yacc'
|
||||
let type_yacc.kinds = [
|
||||
\ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
|
||||
\ ]
|
||||
let types.yacc = type_yacc
|
||||
" }}}1
|
||||
|
||||
for [type, typeinfo] in items(types)
|
||||
let typeinfo.ftype = type
|
||||
endfor
|
||||
|
||||
for typeinfo in values(types)
|
||||
call typeinfo.createKinddict()
|
||||
endfor
|
||||
|
||||
return types
|
||||
endfunction
|
||||
|
||||
" vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1
|
||||
Reference in New Issue
Block a user