From edb5d15f4d512be06902f2ab5ed2af060adbeea6 Mon Sep 17 00:00:00 2001 From: Josh French Date: Thu, 1 Oct 2020 16:03:37 -0400 Subject: [PATCH 1/2] Add typescript mappings for universal ctags --- autoload/tagbar/types/uctags.vim | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/autoload/tagbar/types/uctags.vim b/autoload/tagbar/types/uctags.vim index dbe799a..5853184 100644 --- a/autoload/tagbar/types/uctags.vim +++ b/autoload/tagbar/types/uctags.vim @@ -957,6 +957,35 @@ function! tagbar#types#uctags#init(supported_types) abort \ {'short' : 'p', 'long' : 'procedures', 'fold' : 0, 'stl' : 1} \ ] let types.tcl = type_tcl + " TypeScript {{{1 + let type_ts = tagbar#prototypes#typeinfo#new() + let type_ts.ctagstype = 'typescript' + let type_ts.kinds = [ + \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'C', 'long' : 'constants', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'p', 'long' : 'properties', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'm', 'long' : 'methods', 'fold' : 0, 'stl' : 1}, + \ ] + let type_ts.sro = '.' + let type_ts.kind2scope = { + \ 'c' : 'class', + \ 'i' : 'interface', + \ 'g' : 'enum', + \ 'n' : 'namespace', + \ } + let type_ts.scope2kind = { + \ 'class' : 'c', + \ 'interface' : 'i', + \ 'enum' : 'g', + \ 'namespace' : 'n' + \ } + let types.typescript = type_ts " LaTeX {{{1 let type_tex = tagbar#prototypes#typeinfo#new() let type_tex.ctagstype = 'tex' From 5fc8a7a209383a8bf9e840ad531ebb88a07d0b79 Mon Sep 17 00:00:00 2001 From: Josh French Date: Thu, 1 Oct 2020 16:52:36 -0400 Subject: [PATCH 2/2] enumerators -> enumerations --- autoload/tagbar/types/uctags.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/tagbar/types/uctags.vim b/autoload/tagbar/types/uctags.vim index 5853184..64ca29f 100644 --- a/autoload/tagbar/types/uctags.vim +++ b/autoload/tagbar/types/uctags.vim @@ -964,7 +964,7 @@ function! tagbar#types#uctags#init(supported_types) abort \ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 1}, \ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1}, \ {'short' : 'g', 'long' : 'enums', 'fold' : 0, 'stl' : 1}, - \ {'short' : 'e', 'long' : 'enumerators', 'fold' : 0, 'stl' : 1}, + \ {'short' : 'e', 'long' : 'enumerations', 'fold' : 0, 'stl' : 1}, \ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1}, \ {'short' : 'C', 'long' : 'constants', 'fold' : 0, 'stl' : 1}, \ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},