mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-26 02:13:44 +08:00
Added php scopes and additional kinds
Added scopes, so tagbar will show the following hierarchy: ``` namespace subnamespace ... class property (variable) ... method ... ``` Additional kinds added (basically the same as #283): * namespaces * use aliases (imports) * traits
This commit is contained in:
parent
f20edb5a56
commit
7ffec4539d
|
@ -426,13 +426,25 @@ function! tagbar#types#uctags#init(supported_types) abort
|
|||
let type_php = tagbar#prototypes#typeinfo#new()
|
||||
let type_php.ctagstype = 'php'
|
||||
let type_php.kinds = [
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'n', 'long' : 'namespaces', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'a', 'long' : 'use aliases', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'd', 'long' : 'constant definitions', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'i', 'long' : 'interfaces', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 't', 'long' : 'traits', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'c', 'long' : 'classes', 'fold' : 1, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 1, 'stl' : 0},
|
||||
\ {'short' : 'f', 'long' : 'functions', 'fold' : 0, 'stl' : 1},
|
||||
\ {'short' : 'v', 'long' : 'variables', 'fold' : 0, 'stl' : 0},
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1}
|
||||
\ {'short' : 'j', 'long' : 'javascript functions', 'fold' : 0, 'stl' : 1},
|
||||
\ ]
|
||||
let type_php.sro = '\\\\'
|
||||
let type_php.kind2scope = {
|
||||
\ 'c' : 'class',
|
||||
\ 'n' : 'namespace'
|
||||
\ }
|
||||
let type_php.scope2kind = {
|
||||
\ 'class' : 'c',
|
||||
\ 'namespace' : 'n'
|
||||
\ }
|
||||
let types.php = type_php
|
||||
" Python {{{1
|
||||
let type_python = tagbar#prototypes#typeinfo#new()
|
||||
|
|
Loading…
Reference in New Issue
Block a user