/Plugins/TagBar/Plugin/autoload/tagbar/types/uctags.vim

https://bitbucket.org/WscriChy/vim-configuration · Vim Script · 1064 lines · 983 code · 6 blank · 75 comment · 6 complexity · 56965030b1bdb1f331589a63c78be73e MD5 · raw file

  1. " Type definitions for Universal Ctags
  2. function! tagbar#types#uctags#init(supported_types) abort
  3. let types = {}
  4. " Ada {{{1
  5. let type_ada = tagbar#prototypes#typeinfo#new()
  6. let type_ada.ctagstype = 'ada'
  7. let type_ada.kinds = [
  8. \ {'short' : 'P', 'long' : 'package specifications', 'fold' : 0, 'stl' : 1},
  9. \ {'short' : 'p', 'long' : 'packages', 'fold' : 0, 'stl' : 0},
  10. \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
  11. \ {'short' : 'u', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
  12. \ {'short' : 'c', 'long' : 'record type components', 'fold' : 0, 'stl' : 1},
  13. \ {'short' : 'l', 'long' : 'enum type literals', 'fold' : 0, 'stl' : 0},
  14. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
  15. \ {'short' : 'f', 'long' : 'generic formal parameters', 'fold' : 0, 'stl' : 0},
  16. \ {'short' : 'n', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
  17. \ {'short' : 'x', 'long' : 'user defined exceptions', 'fold' : 0, 'stl' : 1},
  18. \ {'short' : 'R', 'long' : 'subprogram specifications', 'fold' : 0, 'stl' : 1},
  19. \ {'short' : 'r', 'long' : 'subprograms', 'fold' : 0, 'stl' : 1},
  20. \ {'short' : 'K', 'long' : 'task specifications', 'fold' : 0, 'stl' : 1},
  21. \ {'short' : 'k', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
  22. \ {'short' : 'O', 'long' : 'protected data specifications', 'fold' : 0, 'stl' : 1},
  23. \ {'short' : 'o', 'long' : 'protected data', 'fold' : 0, 'stl' : 1},
  24. \ {'short' : 'e', 'long' : 'task/protected data entries', 'fold' : 0, 'stl' : 1},
  25. \ {'short' : 'b', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
  26. \ {'short' : 'i', 'long' : 'loop/declare identifiers', 'fold' : 0, 'stl' : 1},
  27. \ ]
  28. let type_ada.sro = '.' " Not sure if possible
  29. let type_ada.kind2scope = {
  30. \ 'P' : 'packspec',
  31. \ 't' : 'type',
  32. \ }
  33. let type_ada.scope2kind = {
  34. \ 'packspec' : 'P',
  35. \ 'type' : 't',
  36. \ }
  37. let types.ada = type_ada
  38. " Ant {{{1
  39. let type_ant = tagbar#prototypes#typeinfo#new()
  40. let type_ant.ctagstype = 'ant'
  41. let type_ant.kinds = [
  42. \ {'short' : 'p', 'long' : 'projects', 'fold' : 0, 'stl' : 1},
  43. \ {'short' : 'i', 'long' : 'antfiles', 'fold' : 0, 'stl' : 0},
  44. \ {'short' : 'P', 'long' : 'properties', 'fold' : 0, 'stl' : 0},
  45. \ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
  46. \ ]
  47. let types.ant = type_ant
  48. " Asm {{{1
  49. let type_asm = tagbar#prototypes#typeinfo#new()
  50. let type_asm.ctagstype = 'asm'
  51. let type_asm.kinds = [
  52. \ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
  53. \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
  54. \ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
  55. \ {'short' : 'd', 'long' : 'defines', 'fold' : 0, 'stl' : 1},
  56. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
  57. \ ]
  58. let types.asm = type_asm
  59. " ASP {{{1
  60. let type_aspvbs = tagbar#prototypes#typeinfo#new()
  61. let type_aspvbs.ctagstype = 'asp'
  62. let type_aspvbs.kinds = [
  63. \ {'short' : 'd', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
  64. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  65. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  66. \ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
  67. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
  68. \ ]
  69. let types.aspvbs = type_aspvbs
  70. " Asymptote {{{1
  71. " Asymptote gets parsed well using filetype = c
  72. let type_asy = tagbar#prototypes#typeinfo#new()
  73. let type_asy.ctagstype = 'c'
  74. let type_asy.kinds = [
  75. \ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
  76. \ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
  77. \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
  78. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  79. \ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
  80. \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
  81. \ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
  82. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
  83. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
  84. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  85. \ ]
  86. let type_asy.sro = '::'
  87. let type_asy.kind2scope = {
  88. \ 'g' : 'enum',
  89. \ 's' : 'struct',
  90. \ 'u' : 'union'
  91. \ }
  92. let type_asy.scope2kind = {
  93. \ 'enum' : 'g',
  94. \ 'struct' : 's',
  95. \ 'union' : 'u'
  96. \ }
  97. let types.asy = type_asy
  98. " Autoconf {{{1
  99. let type_autoconf = tagbar#prototypes#typeinfo#new()
  100. let type_autoconf.ctagstype = 'autoconf'
  101. let type_autoconf.kinds = [
  102. \ {'short': 'p', 'long': 'packages', 'fold': 0, 'stl': 1},
  103. \ {'short': 't', 'long': 'templates', 'fold': 0, 'stl': 1},
  104. \ {'short': 'm', 'long': 'autoconf macros', 'fold': 0, 'stl': 1},
  105. \ {'short': 'w', 'long': '"with" options', 'fold': 0, 'stl': 1},
  106. \ {'short': 'e', 'long': '"enable" options', 'fold': 0, 'stl': 1},
  107. \ {'short': 's', 'long': 'substitution keys', 'fold': 0, 'stl': 1},
  108. \ {'short': 'c', 'long': 'automake conditions', 'fold': 0, 'stl': 1},
  109. \ {'short': 'd', 'long': 'definitions', 'fold': 0, 'stl': 1},
  110. \ ]
  111. let types.config = type_autoconf
  112. " Automake {{{1
  113. let type_automake = tagbar#prototypes#typeinfo#new()
  114. let type_automake.ctagstype = 'automake'
  115. let type_automake.kinds = [
  116. \ {'short' : 'I', 'long' : 'makefiles', 'fold' : 0, 'stl' : 1},
  117. \ {'short' : 'd', 'long' : 'directories', 'fold' : 0, 'stl' : 1},
  118. \ {'short' : 'P', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
  119. \ {'short' : 'M', 'long' : 'manuals', 'fold' : 0, 'stl' : 1},
  120. \ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
  121. \ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1},
  122. \ {'short' : 'T', 'long' : 'ltlibraries', 'fold' : 0, 'stl' : 1},
  123. \ {'short' : 'L', 'long' : 'libraries', 'fold' : 0, 'stl' : 1},
  124. \ {'short' : 'S', 'long' : 'scripts', 'fold' : 0, 'stl' : 1},
  125. \ {'short' : 'D', 'long' : 'datum', 'fold' : 0, 'stl' : 1},
  126. \ {'short' : 'c', 'long' : 'conditions', 'fold' : 0, 'stl' : 1},
  127. \ ]
  128. let types.automake = type_automake
  129. " Awk {{{1
  130. let type_awk = tagbar#prototypes#typeinfo#new()
  131. let type_awk.ctagstype = 'awk'
  132. let type_awk.kinds = [
  133. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  134. \ ]
  135. let types.awk = type_awk
  136. " Basic {{{1
  137. let type_basic = tagbar#prototypes#typeinfo#new()
  138. let type_basic.ctagstype = 'basic'
  139. let type_basic.kinds = [
  140. \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 1},
  141. \ {'short' : 'g', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
  142. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  143. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
  144. \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
  145. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
  146. \ ]
  147. let types.basic = type_basic
  148. " BETA {{{1
  149. let type_beta = tagbar#prototypes#typeinfo#new()
  150. let type_beta.ctagstype = 'beta'
  151. let type_beta.kinds = [
  152. \ {'short' : 'f', 'long' : 'fragments', 'fold' : 0, 'stl' : 1},
  153. \ {'short' : 's', 'long' : 'slots', 'fold' : 0, 'stl' : 1},
  154. \ {'short' : 'v', 'long' : 'patterns', 'fold' : 0, 'stl' : 1}
  155. \ ]
  156. let types.beta = type_beta
  157. " C {{{1
  158. let type_c = tagbar#prototypes#typeinfo#new()
  159. let type_c.ctagstype = 'c'
  160. let type_c.kinds = [
  161. \ {'short' : 'h', 'long' : 'header files', 'fold' : 1, 'stl' : 0},
  162. \ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
  163. \ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
  164. \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
  165. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  166. \ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
  167. \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
  168. \ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
  169. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
  170. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
  171. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  172. \ ]
  173. let type_c.sro = '::'
  174. let type_c.kind2scope = {
  175. \ 'g' : 'enum',
  176. \ 's' : 'struct',
  177. \ 'u' : 'union'
  178. \ }
  179. let type_c.scope2kind = {
  180. \ 'enum' : 'g',
  181. \ 'struct' : 's',
  182. \ 'union' : 'u'
  183. \ }
  184. let types.c = type_c
  185. " C++ {{{1
  186. let type_cpp = tagbar#prototypes#typeinfo#new()
  187. let type_cpp.ctagstype = 'c++'
  188. let type_cpp.kinds = [
  189. \ {'short' : 'h', 'long' : 'header files', 'fold' : 1, 'stl' : 0},
  190. \ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
  191. \ {'short' : 'p', 'long' : 'prototypes', 'fold' : 1, 'stl' : 0},
  192. \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
  193. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  194. \ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
  195. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
  196. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  197. \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
  198. \ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 1},
  199. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  200. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 0},
  201. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
  202. \ ]
  203. let type_cpp.sro = '::'
  204. let type_cpp.kind2scope = {
  205. \ 'g' : 'enum',
  206. \ 'n' : 'namespace',
  207. \ 'c' : 'class',
  208. \ 's' : 'struct',
  209. \ 'u' : 'union'
  210. \ }
  211. let type_cpp.scope2kind = {
  212. \ 'enum' : 'g',
  213. \ 'namespace' : 'n',
  214. \ 'class' : 'c',
  215. \ 'struct' : 's',
  216. \ 'union' : 'u'
  217. \ }
  218. let types.cpp = type_cpp
  219. let types.cuda = type_cpp
  220. " C# {{{1
  221. let type_cs = tagbar#prototypes#typeinfo#new()
  222. let type_cs.ctagstype = 'c#'
  223. let type_cs.kinds = [
  224. \ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
  225. \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 1},
  226. \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
  227. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  228. \ {'short' : 't', 'long' : 'typedefs', 'fold' : 0, 'stl' : 1},
  229. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
  230. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
  231. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  232. \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
  233. \ {'short' : 'E', 'long' : 'events', 'fold' : 0, 'stl' : 1},
  234. \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
  235. \ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}
  236. \ ]
  237. let type_cs.sro = '.'
  238. let type_cs.kind2scope = {
  239. \ 'n' : 'namespace',
  240. \ 'i' : 'interface',
  241. \ 'c' : 'class',
  242. \ 's' : 'struct',
  243. \ 'g' : 'enum'
  244. \ }
  245. let type_cs.scope2kind = {
  246. \ 'namespace' : 'n',
  247. \ 'interface' : 'i',
  248. \ 'class' : 'c',
  249. \ 'struct' : 's',
  250. \ 'enum' : 'g'
  251. \ }
  252. let types.cs = type_cs
  253. " Clojure {{{1
  254. let type_clojure = tagbar#prototypes#typeinfo#new()
  255. let type_clojure.ctagstype = 'clojure'
  256. let type_clojure.kinds = [
  257. \ {'short': 'n', 'long': 'namespace', 'fold': 0, 'stl': 1},
  258. \ {'short': 'f', 'long': 'function', 'fold': 0, 'stl': 1},
  259. \ ]
  260. let type_clojure.sro = '.'
  261. let type_clojure.kind2scope = {
  262. \ 'n' : 'namespace',
  263. \ }
  264. let type_clojure.scope2kind = {
  265. \ 'namespace' : 'n'
  266. \ }
  267. let types.clojure = type_clojure
  268. " Ctags config {{{1
  269. let type_ctags = tagbar#prototypes#typeinfo#new()
  270. let type_ctags.ctagstype = 'ctags'
  271. let type_ctags.kinds = [
  272. \ {'short' : 'l', 'long' : 'language definitions', 'fold' : 0, 'stl' : 1},
  273. \ {'short' : 'k', 'long' : 'kind definitions', 'fold' : 0, 'stl' : 1},
  274. \ ]
  275. let type_ctags.sro = '.' " Not actually possible
  276. let type_ctags.kind2scope = {
  277. \ 'l' : 'langdef',
  278. \ }
  279. let type_ctags.scope2kind = {
  280. \ 'langdef' : 'l',
  281. \ }
  282. let types.ctags = type_ctags
  283. " COBOL {{{1
  284. let type_cobol = tagbar#prototypes#typeinfo#new()
  285. let type_cobol.ctagstype = 'cobol'
  286. let type_cobol.kinds = [
  287. \ {'short' : 'd', 'long' : 'data items', 'fold' : 0, 'stl' : 1},
  288. \ {'short' : 'D', 'long' : 'divisions', 'fold' : 0, 'stl' : 1},
  289. \ {'short' : 'f', 'long' : 'file descriptions', 'fold' : 0, 'stl' : 1},
  290. \ {'short' : 'g', 'long' : 'group items', 'fold' : 0, 'stl' : 1},
  291. \ {'short' : 'p', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 1},
  292. \ {'short' : 'P', 'long' : 'program ids', 'fold' : 0, 'stl' : 1},
  293. \ {'short' : 'S', 'long' : 'source code file', 'fold' : 0, 'stl' : 1},
  294. \ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
  295. \ ]
  296. let types.cobol = type_cobol
  297. " CSS {{{1
  298. let type_css = tagbar#prototypes#typeinfo#new()
  299. let type_css.ctagstype = 'css'
  300. let type_css.kinds = [
  301. \ {'short' : 's', 'long' : 'selector', 'fold' : 0, 'stl' : 0},
  302. \ {'short' : 'i', 'long' : 'identities', 'fold' : 1, 'stl' : 0},
  303. \ {'short' : 'c', 'long' : 'classes', 'fold' : 1, 'stl' : 0}
  304. \ ]
  305. let types.css = type_css
  306. " D {{{1
  307. let type_d = tagbar#prototypes#typeinfo#new()
  308. let type_d.ctagstype = 'D'
  309. let type_d.kinds = [
  310. \ {'short' : 'M', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  311. \ {'short' : 'V', 'long' : 'version statements', 'fold' : 1, 'stl' : 0},
  312. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
  313. \ {'short' : 'T', 'long' : 'templates', 'fold' : 0, 'stl' : 0},
  314. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  315. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
  316. \ {'short' : 's', 'long' : 'structure names', 'fold' : 0, 'stl' : 1},
  317. \ {'short' : 'g', 'long' : 'enumeration names', 'fold' : 0, 'stl' : 1},
  318. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  319. \ {'short' : 'u', 'long' : 'union names', 'fold' : 0, 'stl' : 1},
  320. \ {'short' : 'p', 'long' : 'function prototypes', 'fold' : 0, 'stl' : 1},
  321. \ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
  322. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
  323. \ {'short' : 'a', 'long' : 'aliases', 'fold' : 1, 'stl' : 0},
  324. \ {'short' : 'X', 'long' : 'mixins', 'fold' : 0, 'stl' : 1},
  325. \ {'short' : 'v', 'long' : 'variable definitions', 'fold' : 0, 'stl' : 0},
  326. \ ]
  327. let type_d.sro = '.'
  328. let type_d.kind2scope = {
  329. \ 'g' : 'enum',
  330. \ 'n' : 'namespace',
  331. \ 'i' : 'interface',
  332. \ 'c' : 'class',
  333. \ 's' : 'struct',
  334. \ 'u' : 'union'
  335. \ }
  336. let type_d.scope2kind = {
  337. \ 'enum' : 'g',
  338. \ 'namespace' : 'n',
  339. \ 'interface' : 'i',
  340. \ 'class' : 'c',
  341. \ 'struct' : 's',
  342. \ 'union' : 'u'
  343. \ }
  344. let types.d = type_d
  345. " DOS Batch {{{1
  346. let type_dosbatch = tagbar#prototypes#typeinfo#new()
  347. let type_dosbatch.ctagstype = 'dosbatch'
  348. let type_dosbatch.kinds = [
  349. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
  350. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}
  351. \ ]
  352. let types.dosbatch = type_dosbatch
  353. " Eiffel {{{1
  354. let type_eiffel = tagbar#prototypes#typeinfo#new()
  355. let type_eiffel.ctagstype = 'eiffel'
  356. let type_eiffel.kinds = [
  357. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  358. \ {'short' : 'f', 'long' : 'features', 'fold' : 0, 'stl' : 1}
  359. \ ]
  360. let type_eiffel.sro = '.' " Not sure, is nesting even possible?
  361. let type_eiffel.kind2scope = {
  362. \ 'c' : 'class',
  363. \ 'f' : 'feature'
  364. \ }
  365. let type_eiffel.scope2kind = {
  366. \ 'class' : 'c',
  367. \ 'feature' : 'f'
  368. \ }
  369. let types.eiffel = type_eiffel
  370. " Elm {{{1
  371. " based on https://github.com/bitterjug/vim-tagbar-ctags-elm/blob/master/ftplugin/elm/tagbar-elm.vim
  372. let type_elm = tagbar#prototypes#typeinfo#new()
  373. let type_elm.ctagstype = 'elm'
  374. let type_elm.kinds = [
  375. \ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 0},
  376. \ {'short' : 'i', 'long' : 'imports', 'fold' : 1, 'stl' : 0},
  377. \ {'short' : 't', 'long' : 'types', 'fold' : 1, 'stl' : 0},
  378. \ {'short' : 'a', 'long' : 'type aliases', 'fold' : 0, 'stl' : 0},
  379. \ {'short' : 'c', 'long' : 'type constructors', 'fold' : 0, 'stl' : 0},
  380. \ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 0},
  381. \ {'short' : 'f', 'long' : 'functions', 'fold' : 1, 'stl' : 0},
  382. \ ]
  383. let type_elm.sro = ':'
  384. let type_elm.kind2scope = {
  385. \ 'f' : 'function',
  386. \ 'm' : 'module',
  387. \ 't' : 'type'
  388. \ }
  389. let type_elm.scope2kind = {
  390. \ 'function' : 'f',
  391. \ 'module' : 'm',
  392. \ 'type' : 't'
  393. \ }
  394. let types.elm = type_elm
  395. " Erlang {{{1
  396. let type_erlang = tagbar#prototypes#typeinfo#new()
  397. let type_erlang.ctagstype = 'erlang'
  398. let type_erlang.kinds = [
  399. \ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  400. \ {'short' : 'd', 'long' : 'macro definitions', 'fold' : 0, 'stl' : 1},
  401. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  402. \ {'short' : 'r', 'long' : 'record definitions', 'fold' : 0, 'stl' : 1},
  403. \ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1}
  404. \ ]
  405. let type_erlang.sro = '.' " Not sure, is nesting even possible?
  406. let type_erlang.kind2scope = {
  407. \ 'm' : 'module'
  408. \ }
  409. let type_erlang.scope2kind = {
  410. \ 'module' : 'm'
  411. \ }
  412. let types.erlang = type_erlang
  413. " Flex {{{1
  414. " Vim doesn't support Flex out of the box, this is based on rough
  415. " guesses and probably requires
  416. " http://www.vim.org/scripts/script.php?script_id=2909
  417. " Improvements welcome!
  418. let type_as = tagbar#prototypes#typeinfo#new()
  419. let type_as.ctagstype = 'flex'
  420. let type_as.kinds = [
  421. \ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
  422. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  423. \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
  424. \ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1},
  425. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  426. \ {'short' : 'x', 'long' : 'mxtags', 'fold' : 0, 'stl' : 0}
  427. \ ]
  428. let type_as.sro = '.'
  429. let type_as.kind2scope = {
  430. \ 'c' : 'class'
  431. \ }
  432. let type_as.scope2kind = {
  433. \ 'class' : 'c'
  434. \ }
  435. let types.mxml = type_as
  436. let types.actionscript = type_as
  437. " Fortran {{{1
  438. let type_fortran = tagbar#prototypes#typeinfo#new()
  439. let type_fortran.ctagstype = 'fortran'
  440. let type_fortran.kinds = [
  441. \ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  442. \ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1},
  443. \ {'short' : 'k', 'long' : 'components', 'fold' : 0, 'stl' : 1},
  444. \ {'short' : 't', 'long' : 'derived types and structures', 'fold' : 0,
  445. \ 'stl' : 1},
  446. \ {'short' : 'c', 'long' : 'common blocks', 'fold' : 0, 'stl' : 1},
  447. \ {'short' : 'b', 'long' : 'block data', 'fold' : 0, 'stl' : 0},
  448. \ {'short' : 'E', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
  449. \ {'short' : 'N', 'long' : 'enumeration values', 'fold' : 0, 'stl' : 0},
  450. \ {'short' : 'e', 'long' : 'entry points', 'fold' : 0, 'stl' : 1},
  451. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  452. \ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
  453. \ {'short' : 'M', 'long' : 'type bound procedures', 'fold' : 0,
  454. \ 'stl' : 1},
  455. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
  456. \ {'short' : 'n', 'long' : 'namelists', 'fold' : 0, 'stl' : 1},
  457. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
  458. \ ]
  459. let type_fortran.sro = '.' " Not sure, is nesting even possible?
  460. let type_fortran.kind2scope = {
  461. \ 'm' : 'module',
  462. \ 'p' : 'program',
  463. \ 'f' : 'function',
  464. \ 's' : 'subroutine'
  465. \ }
  466. let type_fortran.scope2kind = {
  467. \ 'module' : 'm',
  468. \ 'program' : 'p',
  469. \ 'function' : 'f',
  470. \ 'subroutine' : 's'
  471. \ }
  472. let types.fortran = type_fortran
  473. " Go {{{1
  474. let type_go = tagbar#prototypes#typeinfo#new()
  475. let type_go.ctagstype = 'go'
  476. let type_go.kinds = [
  477. \ {'short' : 'p', 'long' : 'packages', 'fold' : 0, 'stl' : 0},
  478. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 0},
  479. \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
  480. \ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
  481. \ {'short' : 'm', 'long' : 'struct members', 'fold' : 0, 'stl' : 0},
  482. \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
  483. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  484. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
  485. \ ]
  486. let type_go.sro = '.'
  487. let type_go.kind2scope = {
  488. \ 's' : 'struct'
  489. \ }
  490. let type_go.scope2kind = {
  491. \ 'struct' : 's'
  492. \ }
  493. let types.go = type_go
  494. " HTML {{{1
  495. let type_html = tagbar#prototypes#typeinfo#new()
  496. let type_html.ctagstype = 'html'
  497. let type_html.kinds = [
  498. \ {'short' : 'a', 'long' : 'named anchors', 'fold' : 0, 'stl' : 1},
  499. \ {'short' : 'h', 'long' : 'H1 headings', 'fold' : 0, 'stl' : 1},
  500. \ {'short' : 'i', 'long' : 'H2 headings', 'fold' : 0, 'stl' : 1},
  501. \ {'short' : 'j', 'long' : 'H3 headings', 'fold' : 0, 'stl' : 1},
  502. \ ]
  503. let types.html = type_html
  504. " Java {{{1
  505. let type_java = tagbar#prototypes#typeinfo#new()
  506. let type_java.ctagstype = 'java'
  507. let type_java.kinds = [
  508. \ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
  509. \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
  510. \ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 1},
  511. \ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
  512. \ {'short' : 'a', 'long' : 'annotations', 'fold' : 0, 'stl' : 0},
  513. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
  514. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  515. \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}
  516. \ ]
  517. let type_java.sro = '.'
  518. let type_java.kind2scope = {
  519. \ 'g' : 'enum',
  520. \ 'i' : 'interface',
  521. \ 'c' : 'class'
  522. \ }
  523. let type_java.scope2kind = {
  524. \ 'enum' : 'g',
  525. \ 'interface' : 'i',
  526. \ 'class' : 'c'
  527. \ }
  528. let types.java = type_java
  529. " JavaScript {{{1
  530. let type_javascript = tagbar#prototypes#typeinfo#new()
  531. let type_javascript.ctagstype = 'javascript'
  532. let type_javascript.kinds = [
  533. \ {'short': 'v', 'long': 'global variables', 'fold': 0, 'stl': 0},
  534. \ {'short': 'C', 'long': 'constants', 'fold': 0, 'stl': 0},
  535. \ {'short': 'c', 'long': 'classes', 'fold': 0, 'stl': 1},
  536. \ {'short': 'g', 'long': 'generators', 'fold': 0, 'stl': 0},
  537. \ {'short': 'p', 'long': 'properties', 'fold': 0, 'stl': 0},
  538. \ {'short': 'm', 'long': 'methods', 'fold': 0, 'stl': 1},
  539. \ {'short': 'f', 'long': 'functions', 'fold': 0, 'stl': 1},
  540. \ ]
  541. let type_javascript.sro = '.'
  542. let type_javascript.kind2scope = {
  543. \ 'c' : 'class',
  544. \ 'f' : 'function',
  545. \ 'm' : 'method',
  546. \ 'p' : 'property',
  547. \ }
  548. let type_javascript.scope2kind = {
  549. \ 'class' : 'c',
  550. \ 'function' : 'f',
  551. \ }
  552. let types.javascript = type_javascript
  553. " Lisp {{{1
  554. let type_lisp = tagbar#prototypes#typeinfo#new()
  555. let type_lisp.ctagstype = 'lisp'
  556. let type_lisp.kinds = [
  557. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  558. \ ]
  559. let types.lisp = type_lisp
  560. " Lua {{{1
  561. let type_lua = tagbar#prototypes#typeinfo#new()
  562. let type_lua.ctagstype = 'lua'
  563. let type_lua.kinds = [
  564. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  565. \ ]
  566. let types.lua = type_lua
  567. " Make {{{1
  568. let type_make = tagbar#prototypes#typeinfo#new()
  569. let type_make.ctagstype = 'make'
  570. let type_make.kinds = [
  571. \ {'short' : 'I', 'long' : 'makefiles', 'fold' : 0, 'stl' : 0},
  572. \ {'short' : 'm', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
  573. \ {'short' : 't', 'long' : 'targets', 'fold' : 0, 'stl' : 1}
  574. \ ]
  575. let types.make = type_make
  576. " Matlab {{{1
  577. let type_matlab = tagbar#prototypes#typeinfo#new()
  578. let type_matlab.ctagstype = 'matlab'
  579. let type_matlab.kinds = [
  580. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  581. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
  582. \ ]
  583. let types.matlab = type_matlab
  584. " ObjectiveC {{{1
  585. let type_objc = tagbar#prototypes#typeinfo#new()
  586. let type_objc.ctagstype = 'objectivec'
  587. let type_objc.kinds = [
  588. \ {'short' : 'M', 'long' : 'preprocessor macros', 'fold' : 1, 'stl' : 0},
  589. \ {'short' : 't', 'long' : 'type aliases', 'fold' : 0, 'stl' : 1},
  590. \ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
  591. \ {'short' : 'i', 'long' : 'class interfaces', 'fold' : 0, 'stl' : 1},
  592. \ {'short' : 'I', 'long' : 'class implementations', 'fold' : 0, 'stl' : 1},
  593. \ {'short' : 'c', 'long' : 'class methods', 'fold' : 0, 'stl' : 1},
  594. \ {'short' : 'E', 'long' : 'object fields', 'fold' : 0, 'stl' : 0},
  595. \ {'short' : 'm', 'long' : 'object methods', 'fold' : 0, 'stl' : 1},
  596. \ {'short' : 's', 'long' : 'type structures', 'fold' : 0, 'stl' : 1},
  597. \ {'short' : 'e', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1},
  598. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  599. \ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 0},
  600. \ {'short' : 'P', 'long' : 'protocols', 'fold' : 0, 'stl' : 0},
  601. \ ]
  602. let type_objc.sro = ':'
  603. let type_objc.kind2scope = {
  604. \ 'i' : 'interface',
  605. \ 'I' : 'implementation',
  606. \ 's' : 'struct',
  607. \ 'p' : 'protocol',
  608. \ }
  609. let type_objc.scope2kind = {
  610. \ 'interface' : 'i',
  611. \ 'implementation' : 'I',
  612. \ 'struct' : 's',
  613. \ 'protocol' : 'p',
  614. \ }
  615. let types.objc = type_objc
  616. let types.objcpp = type_objc
  617. " Ocaml {{{1
  618. let type_ocaml = tagbar#prototypes#typeinfo#new()
  619. let type_ocaml.ctagstype = 'ocaml'
  620. let type_ocaml.kinds = [
  621. \ {'short' : 'M', 'long' : 'modules or functors', 'fold' : 0, 'stl' : 1},
  622. \ {'short' : 'v', 'long' : 'global variables', 'fold' : 0, 'stl' : 0},
  623. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  624. \ {'short' : 'C', 'long' : 'constructors', 'fold' : 0, 'stl' : 1},
  625. \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
  626. \ {'short' : 'e', 'long' : 'exceptions', 'fold' : 0, 'stl' : 1},
  627. \ {'short' : 't', 'long' : 'type names', 'fold' : 0, 'stl' : 1},
  628. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  629. \ {'short' : 'r', 'long' : 'structure fields', 'fold' : 0, 'stl' : 0},
  630. \ {'short' : 'p', 'long' : 'signature items', 'fold' : 0, 'stl' : 0}
  631. \ ]
  632. let type_ocaml.sro = '.' " Not sure, is nesting even possible?
  633. let type_ocaml.kind2scope = {
  634. \ 'M' : 'Module',
  635. \ 'c' : 'class',
  636. \ 't' : 'type'
  637. \ }
  638. let type_ocaml.scope2kind = {
  639. \ 'Module' : 'M',
  640. \ 'class' : 'c',
  641. \ 'type' : 't'
  642. \ }
  643. let types.ocaml = type_ocaml
  644. " Pascal {{{1
  645. let type_pascal = tagbar#prototypes#typeinfo#new()
  646. let type_pascal.ctagstype = 'pascal'
  647. let type_pascal.kinds = [
  648. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  649. \ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
  650. \ ]
  651. let types.pascal = type_pascal
  652. " Perl {{{1
  653. let type_perl = tagbar#prototypes#typeinfo#new()
  654. let type_perl.ctagstype = 'perl'
  655. let type_perl.kinds = [
  656. \ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
  657. \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
  658. \ {'short' : 'f', 'long' : 'formats', 'fold' : 0, 'stl' : 0},
  659. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1},
  660. \ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
  661. \ ]
  662. let types.perl = type_perl
  663. " Perl 6 {{{1
  664. let type_perl6 = tagbar#prototypes#typeinfo#new()
  665. let type_perl6.ctagstype = 'perl6'
  666. let type_perl6.kinds = [
  667. \ {'short' : 'o', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  668. \ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
  669. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  670. \ {'short' : 'g', 'long' : 'grammars', 'fold' : 0, 'stl' : 0},
  671. \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
  672. \ {'short' : 'r', 'long' : 'roles', 'fold' : 0, 'stl' : 1},
  673. \ {'short' : 'u', 'long' : 'rules', 'fold' : 0, 'stl' : 0},
  674. \ {'short' : 'b', 'long' : 'submethods', 'fold' : 0, 'stl' : 1},
  675. \ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1},
  676. \ {'short' : 't', 'long' : 'tokens', 'fold' : 0, 'stl' : 0},
  677. \ ]
  678. let types.perl6 = type_perl6
  679. " PHP {{{1
  680. let type_php = tagbar#prototypes#typeinfo#new()
  681. let type_php.ctagstype = 'php'
  682. let type_php.kinds = [
  683. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 0},
  684. \ {'short' : 'a', 'long' : 'use aliases', 'fold' : 1, 'stl' : 0},
  685. \ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
  686. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
  687. \ {'short' : 't', 'long' : 'traits', 'fold' : 0, 'stl' : 1},
  688. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  689. \ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
  690. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  691. \ ]
  692. let type_php.sro = '\\'
  693. let type_php.kind2scope = {
  694. \ 'c' : 'class',
  695. \ 'n' : 'namespace',
  696. \ 'i' : 'interface',
  697. \ 't' : 'trait',
  698. \ }
  699. let type_php.scope2kind = {
  700. \ 'class' : 'c',
  701. \ 'namespace' : 'n',
  702. \ 'interface' : 'i',
  703. \ 'trait' : 't',
  704. \ }
  705. let types.php = type_php
  706. " Protobuf {{{1
  707. let type_protobuf = tagbar#prototypes#typeinfo#new()
  708. let type_protobuf.ctagstype = 'Protobuf'
  709. let type_protobuf.kinds = [
  710. \ {'short' : 'p', 'long' : 'packages', 'fold' : 0, 'stl' : 0},
  711. \ {'short' : 'm', 'long' : 'messages', 'fold' : 0, 'stl' : 0},
  712. \ {'short' : 'f', 'long' : 'fields', 'fold' : 0, 'stl' : 0},
  713. \ {'short' : 'e', 'long' : 'enum constants', 'fold' : 0, 'stl' : 0},
  714. \ {'short' : 'g', 'long' : 'enum types', 'fold' : 0, 'stl' : 0},
  715. \ {'short' : 's', 'long' : 'services', 'fold' : 0, 'stl' : 0},
  716. \ ]
  717. let types.proto = type_protobuf
  718. " Python {{{1
  719. let type_python = tagbar#prototypes#typeinfo#new()
  720. let type_python.ctagstype = 'python'
  721. let type_python.kinds = [
  722. \ {'short' : 'i', 'long' : 'modules', 'fold' : 1, 'stl' : 0},
  723. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  724. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  725. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
  726. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0}
  727. \ ]
  728. let type_python.sro = '.'
  729. let type_python.kind2scope = {
  730. \ 'c' : 'class',
  731. \ 'f' : 'function',
  732. \ 'm' : 'function'
  733. \ }
  734. let type_python.scope2kind = {
  735. \ 'class' : 'c',
  736. \ 'function' : 'f'
  737. \ }
  738. let type_python.kind2scope.m = 'member'
  739. let type_python.scope2kind.member = 'm'
  740. let types.python = type_python
  741. let types.pyrex = type_python
  742. let types.cython = type_python
  743. " R {{{1
  744. let type_r = tagbar#prototypes#typeinfo#new()
  745. let type_r.ctagstype = 'R'
  746. let type_r.kinds = [
  747. \ {'short' : 'l', 'long' : 'libraries', 'fold' : 1, 'stl' : 0},
  748. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  749. \ {'short' : 's', 'long' : 'sources', 'fold' : 0, 'stl' : 0},
  750. \ {'short' : 'g', 'long' : 'global variables', 'fold' : 0, 'stl' : 1},
  751. \ {'short' : 'v', 'long' : 'function variables', 'fold' : 0, 'stl' : 0},
  752. \ ]
  753. let types.r = type_r
  754. " REXX {{{1
  755. let type_rexx = tagbar#prototypes#typeinfo#new()
  756. let type_rexx.ctagstype = 'rexx'
  757. let type_rexx.kinds = [
  758. \ {'short' : 's', 'long' : 'subroutines', 'fold' : 0, 'stl' : 1}
  759. \ ]
  760. let types.rexx = type_rexx
  761. " Ruby {{{1
  762. let type_ruby = tagbar#prototypes#typeinfo#new()
  763. let type_ruby.ctagstype = 'ruby'
  764. let type_ruby.kinds = [
  765. \ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  766. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  767. \ {'short' : 'f', 'long' : 'methods', 'fold' : 0, 'stl' : 1},
  768. \ {'short' : 'S', 'long' : 'singleton methods', 'fold' : 0, 'stl' : 1}
  769. \ ]
  770. let type_ruby.sro = '.'
  771. let type_ruby.kind2scope = {
  772. \ 'c' : 'class',
  773. \ 'f' : 'method',
  774. \ 'm' : 'module'
  775. \ }
  776. let type_ruby.scope2kind = {
  777. \ 'class' : 'c',
  778. \ 'method' : 'f',
  779. \ 'module' : 'm'
  780. \ }
  781. let types.ruby = type_ruby
  782. " Rust {{{1
  783. let type_rust = tagbar#prototypes#typeinfo#new()
  784. let type_rust.ctagstype = 'rust'
  785. let type_rust.kinds = [
  786. \ {'short' : 'n', 'long' : 'module', 'fold' : 1, 'stl' : 0},
  787. \ {'short' : 's', 'long' : 'struct', 'fold' : 0, 'stl' : 1},
  788. \ {'short' : 'i', 'long' : 'trait', 'fold' : 0, 'stl' : 1},
  789. \ {'short' : 'c', 'long' : 'implementation', 'fold' : 0, 'stl' : 0},
  790. \ {'short' : 'f', 'long' : 'function', 'fold' : 0, 'stl' : 1},
  791. \ {'short' : 'g', 'long' : 'enum', 'fold' : 0, 'stl' : 1},
  792. \ {'short' : 't', 'long' : 'type alias', 'fold' : 0, 'stl' : 1},
  793. \ {'short' : 'v', 'long' : 'global variable', 'fold' : 0, 'stl' : 1},
  794. \ {'short' : 'M', 'long' : 'macro', 'fold' : 0, 'stl' : 1},
  795. \ {'short' : 'm', 'long' : 'struct field', 'fold' : 0, 'stl' : 1},
  796. \ {'short' : 'e', 'long' : 'enum variant', 'fold' : 0, 'stl' : 1},
  797. \ {'short' : 'P', 'long' : 'method', 'fold' : 0, 'stl' : 1}
  798. \ ]
  799. let type_rust.sro = '::'
  800. let type_rust.kind2scope = {
  801. \ 'n' : 'module',
  802. \ 's' : 'struct',
  803. \ 'i' : 'interface',
  804. \ 'c' : 'implementation',
  805. \ 'f' : 'function',
  806. \ 'g' : 'enum',
  807. \ 'P' : 'method',
  808. \ }
  809. let type_rust.scope2kind = {
  810. \ 'module' : 'n',
  811. \ 'struct' : 's',
  812. \ 'interface' : 'i',
  813. \ 'implementation': 'c',
  814. \ 'function' : 'f',
  815. \ 'enum' : 'g',
  816. \ 'method' : 'P',
  817. \ }
  818. let types.rust = type_rust
  819. " Scheme {{{1
  820. let type_scheme = tagbar#prototypes#typeinfo#new()
  821. let type_scheme.ctagstype = 'scheme'
  822. let type_scheme.kinds = [
  823. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  824. \ {'short' : 's', 'long' : 'sets', 'fold' : 0, 'stl' : 1}
  825. \ ]
  826. let types.scheme = type_scheme
  827. let types.racket = type_scheme
  828. " Shell script {{{1
  829. let type_sh = tagbar#prototypes#typeinfo#new()
  830. let type_sh.ctagstype = 'sh'
  831. let type_sh.kinds = [
  832. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  833. \ {'short' : 'a', 'long' : 'aliases', 'fold' : 0, 'stl' : 0},
  834. \ {'short' : 's', 'long' : 'script files', 'fold' : 0, 'stl' : 0}
  835. \ ]
  836. let types.sh = type_sh
  837. let types.csh = type_sh
  838. let types.zsh = type_sh
  839. " SLang {{{1
  840. let type_slang = tagbar#prototypes#typeinfo#new()
  841. let type_slang.ctagstype = 'slang'
  842. let type_slang.kinds = [
  843. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
  844. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}
  845. \ ]
  846. let types.slang = type_slang
  847. " SML {{{1
  848. let type_sml = tagbar#prototypes#typeinfo#new()
  849. let type_sml.ctagstype = 'sml'
  850. let type_sml.kinds = [
  851. \ {'short' : 'e', 'long' : 'exception declarations', 'fold' : 0, 'stl' : 0},
  852. \ {'short' : 'f', 'long' : 'function definitions', 'fold' : 0, 'stl' : 1},
  853. \ {'short' : 'c', 'long' : 'functor definitions', 'fold' : 0, 'stl' : 1},
  854. \ {'short' : 's', 'long' : 'signature declarations', 'fold' : 0, 'stl' : 0},
  855. \ {'short' : 'r', 'long' : 'structure declarations', 'fold' : 0, 'stl' : 0},
  856. \ {'short' : 't', 'long' : 'type definitions', 'fold' : 0, 'stl' : 1},
  857. \ {'short' : 'v', 'long' : 'value bindings', 'fold' : 0, 'stl' : 0}
  858. \ ]
  859. let types.sml = type_sml
  860. " SQL {{{1
  861. " The SQL ctags parser seems to be buggy for me, so this just uses the
  862. " normal kinds even though scopes should be available. Improvements
  863. " welcome!
  864. let type_sql = tagbar#prototypes#typeinfo#new()
  865. let type_sql.ctagstype = 'sql'
  866. let type_sql.kinds = [
  867. \ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 1},
  868. \ {'short' : 'd', 'long' : 'prototypes', 'fold' : 0, 'stl' : 1},
  869. \ {'short' : 'c', 'long' : 'cursors', 'fold' : 0, 'stl' : 1},
  870. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  871. \ {'short' : 'E', 'long' : 'record fields', 'fold' : 0, 'stl' : 1},
  872. \ {'short' : 'L', 'long' : 'block label', 'fold' : 0, 'stl' : 1},
  873. \ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
  874. \ {'short' : 's', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
  875. \ {'short' : 't', 'long' : 'tables', 'fold' : 0, 'stl' : 1},
  876. \ {'short' : 'T', 'long' : 'triggers', 'fold' : 0, 'stl' : 1},
  877. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1},
  878. \ {'short' : 'i', 'long' : 'indexes', 'fold' : 0, 'stl' : 1},
  879. \ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
  880. \ {'short' : 'U', 'long' : 'publications', 'fold' : 0, 'stl' : 1},
  881. \ {'short' : 'R', 'long' : 'services', 'fold' : 0, 'stl' : 1},
  882. \ {'short' : 'D', 'long' : 'domains', 'fold' : 0, 'stl' : 1},
  883. \ {'short' : 'V', 'long' : 'views', 'fold' : 0, 'stl' : 1},
  884. \ {'short' : 'n', 'long' : 'synonyms', 'fold' : 0, 'stl' : 1},
  885. \ {'short' : 'x', 'long' : 'MobiLink Table Scripts', 'fold' : 0, 'stl' : 1},
  886. \ {'short' : 'y', 'long' : 'MobiLink Conn Scripts', 'fold' : 0, 'stl' : 1},
  887. \ {'short' : 'z', 'long' : 'MobiLink Properties', 'fold' : 0, 'stl' : 1}
  888. \ ]
  889. let types.sql = type_sql
  890. " Tcl {{{1
  891. let type_tcl = tagbar#prototypes#typeinfo#new()
  892. let type_tcl.ctagstype = 'tcl'
  893. let type_tcl.kinds = [
  894. \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1},
  895. \ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
  896. \ ]
  897. let types.tcl = type_tcl
  898. " LaTeX {{{1
  899. let type_tex = tagbar#prototypes#typeinfo#new()
  900. let type_tex.ctagstype = 'tex'
  901. let type_tex.kinds = [
  902. \ {'short' : 'i', 'long' : 'includes', 'fold' : 1, 'stl' : 0},
  903. \ {'short' : 'p', 'long' : 'parts', 'fold' : 0, 'stl' : 1},
  904. \ {'short' : 'c', 'long' : 'chapters', 'fold' : 0, 'stl' : 1},
  905. \ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1},
  906. \ {'short' : 'u', 'long' : 'subsections', 'fold' : 0, 'stl' : 1},
  907. \ {'short' : 'b', 'long' : 'subsubsections', 'fold' : 0, 'stl' : 1},
  908. \ {'short' : 'P', 'long' : 'paragraphs', 'fold' : 0, 'stl' : 0},
  909. \ {'short' : 'G', 'long' : 'subparagraphs', 'fold' : 0, 'stl' : 0},
  910. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 0}
  911. \ ]
  912. let type_tex.sro = '""'
  913. let type_tex.kind2scope = {
  914. \ 'p' : 'part',
  915. \ 'c' : 'chapter',
  916. \ 's' : 'section',
  917. \ 'u' : 'subsection',
  918. \ 'b' : 'subsubsection'
  919. \ }
  920. let type_tex.scope2kind = {
  921. \ 'part' : 'p',
  922. \ 'chapter' : 'c',
  923. \ 'section' : 's',
  924. \ 'subsection' : 'u',
  925. \ 'subsubsection' : 'b'
  926. \ }
  927. let type_tex.sort = 0
  928. let types.tex = type_tex
  929. " Vala {{{1
  930. " Vala is supported by the ctags fork provided by Anjuta, so only add the
  931. " type if the fork is used to prevent error messages otherwise
  932. if has_key(a:supported_types, 'vala') || executable('anjuta-tags')
  933. let type_vala = tagbar#prototypes#typeinfo#new()
  934. let type_vala.ctagstype = 'vala'
  935. let type_vala.kinds = [
  936. \ {'short' : 'e', 'long' : 'Enumerations', 'fold' : 0, 'stl' : 1},
  937. \ {'short' : 'v', 'long' : 'Enumeration values', 'fold' : 0, 'stl' : 0},
  938. \ {'short' : 's', 'long' : 'Structures', 'fold' : 0, 'stl' : 1},
  939. \ {'short' : 'i', 'long' : 'Interfaces', 'fold' : 0, 'stl' : 1},
  940. \ {'short' : 'd', 'long' : 'Delegates', 'fold' : 0, 'stl' : 1},
  941. \ {'short' : 'c', 'long' : 'Classes', 'fold' : 0, 'stl' : 1},
  942. \ {'short' : 'p', 'long' : 'Properties', 'fold' : 0, 'stl' : 0},
  943. \ {'short' : 'f', 'long' : 'Fields', 'fold' : 0, 'stl' : 0},
  944. \ {'short' : 'm', 'long' : 'Methods', 'fold' : 0, 'stl' : 1},
  945. \ {'short' : 'E', 'long' : 'Error domains', 'fold' : 0, 'stl' : 1},
  946. \ {'short' : 'r', 'long' : 'Error codes', 'fold' : 0, 'stl' : 1},
  947. \ {'short' : 'S', 'long' : 'Signals', 'fold' : 0, 'stl' : 1}
  948. \ ]
  949. let type_vala.sro = '.'
  950. " 'enum' doesn't seem to be used as a scope, but it can't hurt to have
  951. " it here
  952. let type_vala.kind2scope = {
  953. \ 's' : 'struct',
  954. \ 'i' : 'interface',
  955. \ 'c' : 'class',
  956. \ 'e' : 'enum'
  957. \ }
  958. let type_vala.scope2kind = {
  959. \ 'struct' : 's',
  960. \ 'interface' : 'i',
  961. \ 'class' : 'c',
  962. \ 'enum' : 'e'
  963. \ }
  964. let types.vala = type_vala
  965. endif
  966. if !has_key(a:supported_types, 'vala') && executable('anjuta-tags')
  967. let types.vala.ctagsbin = 'anjuta-tags'
  968. endif
  969. " Vera {{{1
  970. " Why are variables 'virtual'?
  971. let type_vera = tagbar#prototypes#typeinfo#new()
  972. let type_vera.ctagstype = 'vera'
  973. let type_vera.kinds = [
  974. \ {'short' : 'h', 'long' : 'header files', 'fold' : 1, 'stl' : 0},
  975. \ {'short' : 'd', 'long' : 'macros', 'fold' : 1, 'stl' : 0},
  976. \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
  977. \ {'short' : 'T', 'long' : 'typedefs', 'fold' : 0, 'stl' : 0},
  978. \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
  979. \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
  980. \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 0},
  981. \ {'short' : 'm', 'long' : 'members', 'fold' : 0, 'stl' : 1},
  982. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  983. \ {'short' : 's', 'long' : 'signals', 'fold' : 0, 'stl' : 0},
  984. \ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1},
  985. \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
  986. \ {'short' : 'p', 'long' : 'programs', 'fold' : 0, 'stl' : 1}
  987. \ ]
  988. let type_vera.sro = '.' " Nesting doesn't seem to be possible
  989. let type_vera.kind2scope = {
  990. \ 'g' : 'enum',
  991. \ 'c' : 'class',
  992. \ 'v' : 'virtual'
  993. \ }
  994. let type_vera.scope2kind = {
  995. \ 'enum' : 'g',
  996. \ 'class' : 'c',
  997. \ 'virtual' : 'v'
  998. \ }
  999. let types.vera = type_vera
  1000. " Verilog {{{1
  1001. let type_verilog = tagbar#prototypes#typeinfo#new()
  1002. let type_verilog.ctagstype = 'verilog'
  1003. let type_verilog.kinds = [
  1004. \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
  1005. \ {'short' : 'e', 'long' : 'events', 'fold' : 0, 'stl' : 1},
  1006. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  1007. \ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
  1008. \ {'short' : 'b', 'long' : 'blocks', 'fold' : 0, 'stl' : 1},
  1009. \ {'short' : 'n', 'long' : 'net data types', 'fold' : 0, 'stl' : 1},
  1010. \ {'short' : 'p', 'long' : 'ports', 'fold' : 0, 'stl' : 1},
  1011. \ {'short' : 'r', 'long' : 'register data types', 'fold' : 0, 'stl' : 1},
  1012. \ {'short' : 't', 'long' : 'tasks', 'fold' : 0, 'stl' : 1}
  1013. \ ]
  1014. let types.verilog = type_verilog
  1015. " VHDL {{{1
  1016. " The VHDL ctags parser unfortunately doesn't generate proper scopes
  1017. let type_vhdl = tagbar#prototypes#typeinfo#new()
  1018. let type_vhdl.ctagstype = 'vhdl'
  1019. let type_vhdl.kinds = [
  1020. \ {'short' : 'P', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
  1021. \ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
  1022. \ {'short' : 't', 'long' : 'types', 'fold' : 0, 'stl' : 1},
  1023. \ {'short' : 'T', 'long' : 'subtypes', 'fold' : 0, 'stl' : 1},
  1024. \ {'short' : 'r', 'long' : 'records', 'fold' : 0, 'stl' : 1},
  1025. \ {'short' : 'e', 'long' : 'entities', 'fold' : 0, 'stl' : 1},
  1026. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  1027. \ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1}
  1028. \ ]
  1029. let types.vhdl = type_vhdl
  1030. " Vim {{{1
  1031. let type_vim = tagbar#prototypes#typeinfo#new()
  1032. let type_vim.ctagstype = 'vim'
  1033. let type_vim.kinds = [
  1034. \ {'short' : 'n', 'long' : 'vimball filenames', 'fold' : 0, 'stl' : 1},
  1035. \ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
  1036. \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
  1037. \ {'short' : 'a', 'long' : 'autocommand groups', 'fold' : 1, 'stl' : 1},
  1038. \ {'short' : 'c', 'long' : 'commands', 'fold' : 0, 'stl' : 0},
  1039. \ {'short' : 'm', 'long' : 'maps', 'fold' : 1, 'stl' : 0}
  1040. \ ]
  1041. let types.vim = type_vim
  1042. " YACC {{{1
  1043. let type_yacc = tagbar#prototypes#typeinfo#new()
  1044. let type_yacc.ctagstype = 'yacc'
  1045. let type_yacc.kinds = [
  1046. \ {'short' : 'l', 'long' : 'labels', 'fold' : 0, 'stl' : 1}
  1047. \ ]
  1048. let types.yacc = type_yacc
  1049. " }}}1
  1050. for [type, typeinfo] in items(types)
  1051. let typeinfo.ftype = type
  1052. endfor
  1053. for typeinfo in values(types)
  1054. call typeinfo.createKinddict()
  1055. endfor
  1056. return types
  1057. endfunction
  1058. " vim: ts=8 sw=4 sts=4 et foldenable foldmethod=marker foldcolumn=1