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

Add g:tagbar_scopestrs (#661)

Allows mapping scope suffixes (e.g. 'function') to user-defined values.
This commit is contained in:
Luis Piloto
2020-09-23 11:02:34 +01:00
committed by GitHub
parent 1caa71aca3
commit 5339b4e8bd
3 changed files with 44 additions and 1 deletions

View File

@@ -733,6 +733,38 @@ just choose other characters in that case):
let g:tagbar_iconchars = ['▸', '▾']
let g:tagbar_iconchars = ['▷', '◢']
let g:tagbar_iconchars = ['+', '-'] (default on Windows)
<
*g:tagbar_scopestrs*
g:tagbar_scopestrs~
Default: {}
Setting to replace a tag's scope with a user-specified string in Tagbar's
display. If a scope is found in the keys of |g:tagbar_scopestrs|, then the
scope will be displayed as the corresponding value. If the scope is not
found, then the scope will be displayed as normal.
Example (don't worry if some of the characters aren't displayed correctly,
just choose other characters or strings in that case):
>
let g:tagbar_scopestrs = {
\ 'class': "\uf0e8",
\ 'const': "\uf8ff",
\ 'constant': "\uf8ff",
\ 'enum': "\uf702",
\ 'field': "\uf30b",
\ 'func': "\uf794",
\ 'function': "\uf794",
\ 'getter': "\ufab6",
\ 'implementation': "\uf776",
\ 'interface': "\uf7fe",
\ 'map': "\ufb44",
\ 'member': "\uf02b",
\ 'method': "\uf6a6",
\ 'setter': "\uf7a9",
\ 'variable': "\uf71b",
\ }
<
*g:tagbar_autoshowtag*