mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 19:40:27 +01:00
51 lines
1.9 KiB
VimL
51 lines
1.9 KiB
VimL
" File: tagbar.vim
|
|
" Description: Tagbar syntax settings
|
|
" Author: Jan Larres <jan@majutsushi.net>
|
|
" Licence: Vim licence
|
|
" Website: http://majutsushi.github.com/tagbar/
|
|
" Version: 1.5
|
|
|
|
if exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
if has('multi_byte') && &encoding == 'utf-8' &&
|
|
\ (empty(&termencoding) || &termencoding == 'utf-8')
|
|
syntax match TagbarKind '\([▶▼][-+ ]\)\@<=[^-+: ]\+[^:]\+$'
|
|
syntax match TagbarScope '[^-+#▶▼(* ]\+\(\*\? :\)\@='
|
|
|
|
syntax match TagbarFoldIcon '[▶▼]\([-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessPublic '\([▶▼ ]\)\@<=+\([^-+# ]\)\@='
|
|
syntax match TagbarAccessProtected '\([▶▼ ]\)\@<=#\([^-+# ]\)\@='
|
|
syntax match TagbarAccessPrivate '\([▶▼ ]\)\@<=-\([^-+# ]\)\@='
|
|
else
|
|
syntax match TagbarKind '\([-+][-+ ]\)\@<=[^-+: ]\+[^:]\+$'
|
|
syntax match TagbarScope '[^-+#(* ]\+\(\*\? :\)\@='
|
|
|
|
syntax match TagbarFoldIcon '[-+]\([-+# ]\)\@='
|
|
|
|
syntax match TagbarAccessPublic '\([-+ ]\)\@<=+\([^-+# ]\)\@='
|
|
syntax match TagbarAccessProtected '\([-+ ]\)\@<=#\([^-+# ]\)\@='
|
|
syntax match TagbarAccessPrivate '\([-+ ]\)\@<=-\([^-+# ]\)\@='
|
|
endif
|
|
|
|
syntax match TagbarComment '^".*'
|
|
syntax match TagbarScopeType ' : \zs.*'
|
|
syntax match TagbarSignature '(.*)'
|
|
syntax match TagbarPseudoID '\*\ze :'
|
|
|
|
highlight default link TagbarComment Comment
|
|
highlight default link TagbarKind Identifier
|
|
highlight default link TagbarScope Title
|
|
highlight default link TagbarScopeType Type
|
|
highlight default link TagbarSignature SpecialKey
|
|
highlight default link TagbarPseudoID NonText
|
|
highlight default link TagbarFoldIcon FoldColumn
|
|
|
|
highlight default TagbarAccessPublic guifg=Green ctermfg=Green
|
|
highlight default TagbarAccessProtected guifg=Blue ctermfg=Blue
|
|
highlight default TagbarAccessPrivate guifg=Red ctermfg=Red
|
|
|
|
let b:current_syntax = "tagbar"
|