1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-17 11:30:28 +01:00

feature: Add basic Crystal support (#787)

This commit is contained in:
Damir Sharipov
2021-08-06 15:23:55 +03:00
committed by GitHub
parent cd74f18d10
commit ab6f2d5a68
2 changed files with 30 additions and 0 deletions

View File

@@ -195,6 +195,21 @@ function! tagbar#types#ctags#init(supported_types) abort
\ {'short' : 's', 'long' : 'sections', 'fold' : 0, 'stl' : 1}
\ ]
let types.cobol = type_cobol
" Crystal {{{1
let type_crystal = tagbar#prototypes#typeinfo#new()
let type_crystal.ctagstype = 'crystal'
let type_crystal.kinds = [
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
\ {'short' : 'd', 'long' : 'defs', 'fold' : 0, 'stl' : 1},
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
\ {'short' : 'M', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
\ {'short' : 'l', 'long' : 'libs', 'fold' : 0, 'stl' : 1},
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
\ {'short' : 'a', 'long' : 'aliases', 'fold' : 0, 'stl' : 1}
\ ]
let type_crystal.sro = '::'
let types.crystal = type_crystal
" DOS Batch {{{1
let type_dosbatch = tagbar#prototypes#typeinfo#new()
let type_dosbatch.ctagstype = 'dosbatch'

View File

@@ -319,6 +319,21 @@ function! tagbar#types#uctags#init(supported_types) abort
\ 'function' : 'f',
\ }
let types.cmake = type_cmake
" Crystal {{{1
let type_crystal = tagbar#prototypes#typeinfo#new()
let type_crystal.ctagstype = 'crystal'
let type_crystal.kinds = [
\ {'short' : 'm', 'long' : 'modules', 'fold' : 0, 'stl' : 1},
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
\ {'short' : 'd', 'long' : 'defs', 'fold' : 0, 'stl' : 1},
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
\ {'short' : 'M', 'long' : 'macros', 'fold' : 0, 'stl' : 1},
\ {'short' : 'l', 'long' : 'libs', 'fold' : 0, 'stl' : 1},
\ {'short' : 's', 'long' : 'structs', 'fold' : 0, 'stl' : 1},
\ {'short' : 'a', 'long' : 'aliases', 'fold' : 0, 'stl' : 1}
\ ]
let type_crystal.sro = '::'
let types.crystal = type_crystal
" Ctags config {{{1
let type_ctags = tagbar#prototypes#typeinfo#new()
let type_ctags.ctagstype = 'ctags'