mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 03:50:26 +01:00
Feature Request: Ignore anonymous option (#727)
Closes #726 New option `g:tagbar_ignore_anonymous` to ignore any tags with __anon in the tag name. CTAGS will print any unlabeled tags with the __anon### name with a custom hash. This option will ignore those tags and they will not be visible in the tagbar window. This could potentially result in unknown behavior when a parent object has been ignored in this way. However these tags should then fall under the default hierarchy for that particular kind.
This commit is contained in:
@@ -1281,6 +1281,11 @@ function! s:ProcessFile(fname, ftype) abort
|
||||
if line =~# '^!_TAG_' || has_key(seen, line)
|
||||
continue
|
||||
endif
|
||||
if g:tagbar_ignore_anonymous && line =~# '__anon'
|
||||
call tagbar#debug#log('anonymous tag found - ignoring per tagbar configuration')
|
||||
continue
|
||||
endif
|
||||
|
||||
let seen[line] = 1
|
||||
|
||||
let parts = split(line, ';"')
|
||||
|
||||
Reference in New Issue
Block a user