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:
Bruce Weirdan 2017-08-18 03:07:39 +03:00 committed by Jan Larres
parent f20edb5a56
commit 7ffec4539d

View File

@ -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()