Skip to content

Commit 3fa84ab

Browse files
committed
Support odin
1 parent b37b05f commit 3fa84ab

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

autoload/tagbar/types/uctags.vim

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,41 @@ function! tagbar#types#uctags#init(supported_types) abort
906906
\ 'type' : 't'
907907
\ }
908908
let types.ocaml = type_ocaml
909+
" Odin {{{1
910+
let type_odin = tagbar#prototypes#typeinfo#new()
911+
let type_odin.ctagstype = 'odin'
912+
let type_odin.kinds = [
913+
\ {'short' : 'p', 'long' : 'packages', 'fold' : 1, 'stl' : 0},
914+
\ {'short' : 'f', 'long' : 'procedures', 'fold' : 0, 'stl' : 1},
915+
\ {'short' : 'c', 'long' : 'constants', 'fold' : 0, 'stl' : 0},
916+
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
917+
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
918+
\ {'short' : 'e', 'long' : 'enums', 'fold' : 0, 'stl' : 1},
919+
\ {'short' : 'u', 'long' : 'unions', 'fold' : 0, 'stl' : 0},
920+
\ {'short' : 'm', 'long' : 'struct members', 'fold' : 0, 'stl' : 0},
921+
\ {'short' : 'n', 'long' : 'enum values', 'fold' : 0, 'stl' : 0},
922+
\ {'short' : 't', 'long' : 'type aliases', 'fold' : 0, 'stl' : 0},
923+
\ {'short' : 'g', 'long' : 'foreign imports', 'fold' : 0, 'stl' : 0},
924+
\ {'short' : 'i', 'long' : 'import names', 'fold' : 1, 'stl' : 0},
925+
\ {'short' : 'L', 'long' : 'C code', 'fold' : 0, 'stl' : 0},
926+
\ {'short' : 'A', 'long' : 'assembly files', 'fold' : 0, 'stl' : 0},
927+
\ {'short' : 'C', 'long' : 'collection', 'fold' : 0, 'stl' : 0},
928+
\ ]
929+
let type_odin.sro = '.'
930+
931+
let type_odin.kind2scope = {
932+
\ 's' : 'struct',
933+
\ 'e' : 'enum',
934+
\ 'u' : 'union',
935+
\ 'p' : 'package',
936+
\ }
937+
let type_odin.scope2kind = {
938+
\ 'struct' : 's',
939+
\ 'enum' : 'e',
940+
\ 'union' : 'u',
941+
\ 'package' : 'p',
942+
\ }
943+
let types.odin = type_odin
909944
" Pascal {{{1
910945
let type_pascal = tagbar#prototypes#typeinfo#new()
911946
let type_pascal.ctagstype = 'pascal'

0 commit comments

Comments
 (0)