github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/scripts/crlog.vim (about)

     1  " Vim syntax file
     2  " Language:         CockroachDB logs
     3  " Maintainer:       Radu Berinde <radu@cockroachlabs.com>
     4  
     5  if exists("b:current_syntax")
     6    finish
     7  endif
     8  
     9  syn match   messageBeginI       display '^I' nextgroup=messageDate
    10  syn match   messageBeginW       display '^W' nextgroup=messageDate
    11  syn match   messageBeginE       display '^E' nextgroup=messageDate
    12  syn match   messageBeginF       display '^F' nextgroup=messageDate
    13  
    14  syn match   messageDate         contained display '\d\d\d\d\d\d ' nextgroup=messageTime
    15  
    16  syn match   messageTime         contained display '\d\d:\d\d:\d\d.\d* ' nextgroup=messageGoID
    17  
    18  syn match   messageGoID         contained display '[0-9a-fA-F]* ' nextgroup=messageFile
    19  
    20  syn match   messageFile         contained display '[_./0-9a-zA-Z]*:\d*  ' nextgroup=messageTags
    21  
    22  syn match   messageTags         contained display '\[[^\]]*\] '
    23  
    24  syn match   messageNumber       '0x[0-9a-fA-F]*\|\[<[0-9a-f]\+>\]\|\<\d[0-9a-fA-F]*'
    25  
    26  hi def link messageBeginI Identifier
    27  hi def link messageBeginW Special
    28  hi def link messageBeginE ErrorMsg
    29  hi def link messageBeginF ErrorMsg
    30  hi def link messageDate   Constant
    31  hi def link messageTime   Type
    32  hi def link messageFile   Comment
    33  hi def link messageTags   Keyword
    34  hi def link messageGoID   Keyword
    35  hi def link messageNumber Number
    36  
    37  
    38  syn match   gotestRun           display '^=== RUN .*$'
    39  syn match   gotestPass          display '^--- PASS: .*$'
    40  syn match   gotestFail          display '^--- FAIL: .*$'
    41  syn match   gotestFail          display '^WARNING: DATA RACE'
    42  
    43  hi def link gotestRun  Keyword
    44  hi def link gotestPass Type
    45  hi def link gotestFail ErrorMsg
    46  
    47  let b:current_syntax = "crlog"