1
0
mirror of https://github.com/gryf/tagbar.git synced 2025-12-18 12:00:23 +01:00

Merge branch 'master' into large-file-handling

This commit is contained in:
raven42
2020-09-23 11:47:24 -05:00
committed by GitHub
5 changed files with 91 additions and 3 deletions

View File

@@ -3,6 +3,9 @@ let s:visibility_symbols = {
\ 'protected' : '#',
\ 'private' : '-'
\ }
if exists('g:tagbar_visibility_symbols') && !empty(g:tagbar_visibility_symbols)
let s:visibility_symbols = g:tagbar_visibility_symbols
endif
function! tagbar#prototypes#basetag#new(name) abort
let newobj = {}

View File

@@ -1,3 +1,12 @@
function! s:maybe_map_scope(scopestr) abort
if !empty(g:tagbar_scopestrs)
if has_key(g:tagbar_scopestrs, a:scopestr)
return g:tagbar_scopestrs[a:scopestr]
endif
endif
return a:scopestr
endfunction
function! tagbar#prototypes#normaltag#new(name) abort
let newobj = tagbar#prototypes#basetag#new(a:name)
@@ -22,7 +31,8 @@ function! s:strfmt() abort dict
if has_key(self.fields, 'type')
let suffix .= ' : ' . self.fields.type
elseif has_key(get(typeinfo, 'kind2scope', {}), self.fields.kind)
let suffix .= ' : ' . typeinfo.kind2scope[self.fields.kind]
let scope = s:maybe_map_scope(typeinfo.kind2scope[self.fields.kind])
let suffix .= ' : ' . scope
endif
return self._getPrefix() . self.name . suffix