@@ -528,6 +528,43 @@ function! tagbar#types#uctags#init(supported_types) abort
528
528
\ ' module' : ' m'
529
529
\ }
530
530
let types.ruby = type_ruby
531
+ " Rust {{{1
532
+ let type_rust = tagbar#prototypes#typeinfo#new ()
533
+ let type_rust.ctagstype = ' rust'
534
+ let type_rust.kinds = [
535
+ \ {' short' : ' n' , ' long' : ' module' , ' fold' : 1 , ' stl' : 0 },
536
+ \ {' short' : ' s' , ' long' : ' struct' , ' fold' : 0 , ' stl' : 1 },
537
+ \ {' short' : ' i' , ' long' : ' trait' , ' fold' : 0 , ' stl' : 1 },
538
+ \ {' short' : ' c' , ' long' : ' implementation' , ' fold' : 0 , ' stl' : 0 },
539
+ \ {' short' : ' f' , ' long' : ' function' , ' fold' : 0 , ' stl' : 1 },
540
+ \ {' short' : ' g' , ' long' : ' enum' , ' fold' : 0 , ' stl' : 1 },
541
+ \ {' short' : ' t' , ' long' : ' type alias' , ' fold' : 0 , ' stl' : 1 },
542
+ \ {' short' : ' v' , ' long' : ' global variable' , ' fold' : 0 , ' stl' : 1 },
543
+ \ {' short' : ' M' , ' long' : ' macro' , ' fold' : 0 , ' stl' : 1 },
544
+ \ {' short' : ' m' , ' long' : ' struct field' , ' fold' : 0 , ' stl' : 1 },
545
+ \ {' short' : ' e' , ' long' : ' enum variant' , ' fold' : 0 , ' stl' : 1 },
546
+ \ {' short' : ' F' , ' long' : ' method' , ' fold' : 0 , ' stl' : 1 }
547
+ \ ]
548
+ let type_rust.sro = ' ::'
549
+ let type_rust.kind2scope = {
550
+ \ ' n' : ' module' ,
551
+ \ ' s' : ' struct' ,
552
+ \ ' i' : ' interface' ,
553
+ \ ' c' : ' implementation' ,
554
+ \ ' f' : ' function' ,
555
+ \ ' g' : ' enum' ,
556
+ \ ' F' : ' method' ,
557
+ \ }
558
+ let type_rust.scope2kind = {
559
+ \ ' module' : ' n' ,
560
+ \ ' struct' : ' s' ,
561
+ \ ' interface' : ' i' ,
562
+ \ ' implementation' : ' c' ,
563
+ \ ' function' : ' f' ,
564
+ \ ' enum' : ' g' ,
565
+ \ ' method' : ' F' ,
566
+ \ }
567
+ let types.rust = type_rust
531
568
" Scheme {{{1
532
569
let type_scheme = tagbar#prototypes#typeinfo#new ()
533
570
let type_scheme.ctagstype = ' scheme'
0 commit comments