mirror of
https://github.com/preservim/tagbar.git
synced 2024-11-23 20:49:34 +08:00
Merge branch 'inkarkat-enh-syntax'
This commit is contained in:
commit
cde257b1bc
|
@ -8,32 +8,24 @@
|
|||
scriptencoding utf-8
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
finish
|
||||
endif
|
||||
|
||||
let s:ic = g:tagbar_iconchars[0]
|
||||
if s:ic =~ '[]^\\-]'
|
||||
let s:ic = '\' . s:ic
|
||||
endif
|
||||
let s:io = g:tagbar_iconchars[1]
|
||||
if s:io =~ '[]^\\-]'
|
||||
let s:io = '\' . s:io
|
||||
endif
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '] \?\)\@<=[^-+: ]\+[^:]\+$'
|
||||
let s:ics = escape(join(g:tagbar_iconchars, ''), ']^\-')
|
||||
let s:pattern = '\(^[' . s:ics . '] \?\)\@<=[^-+: ]\+[^:]\+$'
|
||||
execute "syntax match TagbarKind '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . '][-+# ]\?\)\@<=[^*(]\+\(\*\?\(([^)]\+)\)\? :\)\@='
|
||||
execute "syntax match TagbarScope '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '[' . s:ic . s:io . ']\([-+# ]\?\)\@='
|
||||
let s:pattern = '\S\@<![' . s:ics . ']\([-+# ]\?\)\@='
|
||||
execute "syntax match TagbarFoldIcon '" . s:pattern . "'"
|
||||
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=+\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPublic '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=#\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityProtected '" . s:pattern . "'"
|
||||
let s:pattern = '\([' . s:ic . s:io . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
let s:pattern = '\(\S\@<![' . s:ics . ' ]\)\@<=-\([^-+# ]\)\@='
|
||||
execute "syntax match TagbarVisibilityPrivate '" . s:pattern . "'"
|
||||
|
||||
unlet s:pattern
|
||||
|
|
Loading…
Reference in New Issue
Block a user