mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Use 'visibility' instead of 'access' everywhere exclusively
This commit is contained in:
@@ -61,7 +61,7 @@ let s:window_expanded = 0
|
||||
let s:compare_typeinfo = {}
|
||||
|
||||
|
||||
let s:access_symbols = {
|
||||
let s:visibility_symbols = {
|
||||
\ 'public' : '+',
|
||||
\ 'protected' : '#',
|
||||
\ 'private' : '-'
|
||||
@@ -1207,8 +1207,9 @@ function! s:BaseTag._getPrefix() abort dict
|
||||
else
|
||||
let prefix = ' '
|
||||
endif
|
||||
" Visibility is called 'access' in the ctags output
|
||||
if has_key(self.fields, 'access')
|
||||
let prefix .= get(s:access_symbols, self.fields.access, ' ')
|
||||
let prefix .= get(s:visibility_symbols, self.fields.access, ' ')
|
||||
else
|
||||
let prefix .= ' '
|
||||
endif
|
||||
|
||||
@@ -61,7 +61,7 @@ Then Tagbar would display the tag information like so:
|
||||
<
|
||||
This example shows several important points. First, the tags are listed
|
||||
indented below the scope they are defined in. Second, the type of a scope is
|
||||
listed after its name and a colon. Third, tags for which the access/visibility
|
||||
listed after its name and a colon. Third, tags for which the visibility
|
||||
information is known are prefixed with a symbol indicating that.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
@@ -556,14 +556,14 @@ TagbarFoldIcon
|
||||
TagbarHighlight
|
||||
The colour that is used for automatically highlighting the current tag.
|
||||
|
||||
TagbarAccessPublic
|
||||
The "public" visibility/access symbol.
|
||||
TagbarVisibilityPublic
|
||||
The "public" visibility symbol.
|
||||
|
||||
TagbarAccessProtected
|
||||
The "protected" visibility/access symbol.
|
||||
TagbarVisibilityProtected
|
||||
The "protected" visibility symbol.
|
||||
|
||||
TagbarAccessPrivate
|
||||
The "private" visibility/access symbol.
|
||||
TagbarVisibilityPrivate
|
||||
The "private" visibility symbol.
|
||||
|
||||
If you want to change any of those colours put a line like the following in
|
||||
your vimrc:
|
||||
@@ -965,9 +965,9 @@ imporant tips to get it to integrate well with Tagbar:
|
||||
* line: The line number of the tag.
|
||||
* column: The column number of the tag.
|
||||
* signature: The signature of a function.
|
||||
* access: Visibility/access information of a tag; the values
|
||||
"public", "protected" and "private" will be denoted with
|
||||
a special symbol in Tagbar.
|
||||
* access: Visibility information of a tag; the values "public",
|
||||
"protected" and "private" will be denoted with a special
|
||||
symbol in Tagbar.
|
||||
|
||||
In addition fields that describe the surrounding scope of the tag are
|
||||
supported if they are specified in the type configuration as explained at
|
||||
|
||||
@@ -30,11 +30,11 @@ let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPublic '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessProtected '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarAccessPrivate '" . s:pattern . "'"
|
||||
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
||||
@@ -57,6 +57,9 @@ highlight default link TagbarHighlight Search
|
||||
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
||||
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
||||
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
||||
highlight default link TagbarVisibilityPublic TagbarAccessPublic
|
||||
highlight default link TagbarVisibilityProtected TagbarAccessProtected
|
||||
highlight default link TagbarVisibilityPrivate TagbarAccessPrivate
|
||||
|
||||
let b:current_syntax = "tagbar"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user