timetracker/vim/syntax/timetracker.vim

101 lines
5.1 KiB
VimL
Raw Permalink Normal View History

" Vim syntaxtax file
" Language: timetracker log
" Creator: Trey Blancher $(base64 -d <<< dGJsYW5jaGVyQHBpbmRyb3AuY29tCg==)
" Latest revision: 2024-06-25
if exists("b:current_syntax")
finish
endif
syntax keyword timetrackerCategories Cloud Call Delivery Internal On Prem PTO transparent contained
syntax keyword timetrackerStartStop Begin End
syntax keyword timetrackerStandardOps
\ API
\ APT
\ AST
\ AVT
\ All
\ Auth
\ Authenticate
\ Behavior
\ Bio
\ Call
\ Certified Kubernetes Administrator
\ Clarizen
\ Correlation
\ Device
\ DRE
\ DSM
\ Express
\ Feedback
\ Grafana
\ Hands
\ Identity
\ IR
\ Keyboard
\ Maestro
\ Management
\ PCPN
\ Passport
\ PIN token renewal
\ PMR
\ Prometheus
\ Protect
\ Push
\ Resource
\ Risk
\ Slack
\ Transfer
\ VeriCall
\ Voice
\ Vormetric
\ access
\ behaviorprint
\ daily
\ email
\ handling
\ lesson
\ macOS
\ meeting
\ phoneprint
\ prep
\ scheduled
\ standup
\ timesheets
\ timetracker
\ triage
\ upgrades
\ verification
\ voiceprint
syntax keyword Customers
\ Customer 1
\ Customer 2
\ Customer 3
syntax match timetrackerTimestamp /\d\{4}-\%(0[135789]-\%([0-2]\d\|3[01]\)\|\%(1[02]-\%([0-2]\d\|3[01]\)\)\|0[46]-\%([0-2]\d\|30\)\|11-\%([0-2]\d\|30\)\|02-[0-2]\d\) \%([01]\d\|2[0-3]\):\%([0-5]\d\)\%(:[0-5]\d\)\{2}/ contained
"syntax match ticket /\(#|CM-|PD-\)\d\+/
"syntax match timetrackerTimestampError /^\(\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!/ contained
syntax match timetrackerTask /.*/ contained
"syntax match timetrackerTimestampError /^\(\(\d\{4}-\d\{2}-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!\)/ transparent contained
"syntax region errTimestamp matchgroup=timestamp start=/^\(\d\{4}-\(0\d\|1[0-2]\)-\d\{2} \d\{2}:\d\{2}:\d\{2}\)\@!/ end=/: / contains=timetrackerTimestamp
syntax region timestampGroup start=/^/ end=/: / contains=timetrackerTimestamp
syntax region errTimestamp matchgroup=timestamp start="^\%(\d\{4}-\%(\%(0[13578]\|1[02]\)-\%([0-2]\d\|3[01]\)\|\%(0[469]\|11\)-\%([0-2]\d\|30\)\|02-[0-2]\d\) \%([01]\d\|2[0-3]\)\%(:[0-5]\d\)\{2}\)\@!" end=": "
syntax region category start=/\[/ end=/\]/ contains=timetrackerCategories
syntax region ticket start=/\(#\|CM-\|PD-\|NETENG-\|OPS-\|INC-\)\d\{-1}/ end=/\d /
"syntax region item matchgroup=task start=/\]\s[\k ]\+/ end=/$/ contains=ticket
let b:current_syntaxtax = "timetracker"
highlight default link errTimestamp Error
highlight default link timestamp String
highlight default link timestampGroup String
highlight default link timetrackerStartStop Statement
highlight default link category Type
highlight default link ticket Constant
highlight default link Customers Identifier
highlight default link timetrackerStandardOps Define