1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-24 09:30:04 +08:00
SpaceVim/bundle/vim-chat/syntax/vimchat.vim

46 lines
1.8 KiB
VimL
Raw Normal View History

" syn match vimChatMsg /^\[\d\d\(:\d\d\)\{0,2\}].\{-}:/ contains=vimChatTime,vimChatMe
" syn match vimChatTime /\[\d\d\(:\d\d\)\{0,2\}]/ contained nextgroup=vimChatMe
" syn match vimChatMe /Me:/ contained
" Comment, Type, String, Statement
" hi link vimChatMsg Comment
" hi link vimChatTime String
" hi link vimChatMe Type
2021-10-27 00:50:09 +08:00
" syn match vimChatMsg /^\[\d\d\(:\d\d\)\{0,2\}][^>]*/ contains=vimChatTime,vimChatNick
if !exists("main_syntax")
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
let main_syntax = 'vimchat'
endif
syntax sync fromstart
2022-04-30 02:03:01 +08:00
syn match VimChatTime /\[\d\d\d\d-\d\d-\d\d\s\d\d\:\d\d]/
syn match VimChatVert /│/
syn match VimChatNick /\[\d\d\d\d-\d\d-\d\d\s\d\d\:\d\d]\s│[^│]*│/ contains=VimChatTime,VimChatVert
syntax match VimChatCodeBlock /`[^`]*`/
syntax match VimChatRemoteNickL /\*\*`/ conceal
2022-05-01 01:50:22 +08:00
syntax match VimChatRemoteNickR /`\*\*/ conceal
syntax match VimChatRemoteNick /**`[^`]*`\*\*/ contains=VimChatRemoteNickR,VimChatRemoteNickL
2022-05-01 11:26:36 +08:00
syntax match VimChatPing /\s\zs@\S*/
syntax match VimChatQuoteMsg /.*│\s>\s.*/ contains=VimChatTime,VimChatVert,VimChatNick
syn region VimChatCodeBlockLines start=".*│\s*````*.*$" end="│\s*````*\ze\s*$" contains=VimChatTime,VimChatVert,VimChatNick keepend
2022-05-04 14:52:58 +08:00
syntax match VimChatReplayCounts /.*│\s->\s\d*\s\(reply\|replies\)/ contains=VimChatTime,VimChatVert,VimChatNick
2021-10-27 00:50:09 +08:00
" hi def link vimChatMsg Comment
2022-04-30 23:52:33 +08:00
hi def link VimChatTime Comment
hi def link VimChatQuoteMsg Comment
hi def link VimChatReplayCounts Comment
2021-10-27 00:50:09 +08:00
hi def link VimChatNick Type
hi def link VimChatVert VertSplit
2022-05-01 01:50:22 +08:00
hi def link VimChatRemoteNick Todo
2022-05-01 11:26:36 +08:00
hi def link VimChatPing ModeMsg
hi def link VimChatCodeBlock String
hi def link VimChatCodeBlockLines String
let b:current_syntax = "vimchat"
if main_syntax == 'vimchat'
unlet main_syntax
endif