neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

pacmanlog.vim (2028B)


      1 " Vim syntax file
      2 " Language: pacman.log
      3 " Maintainer: Ronan Pigott <ronan@rjp.ie>
      4 " Last Change: 2023 Dec 04
      5 " 2025 Apr 16 by Vim Project (set 'cpoptions' for line continuation, #17121)
      6 
      7 if exists("b:current_syntax")
      8  finish
      9 endif
     10 
     11 let s:cpo_save = &cpo
     12 set cpo&vim
     13 
     14 syn sync maxlines=1
     15 syn region pacmanlogMsg start='\S' end='$' keepend contains=pacmanlogTransaction,pacmanlogALPMMsg
     16 syn region pacmanlogTag start='\['hs=s+1 end='\]'he=e-1 keepend nextgroup=pacmanlogMsg
     17 syn region pacmanlogTime start='^\['hs=s+1 end='\]'he=e-1 keepend nextgroup=pacmanlogTag
     18 
     19 syn match pacmanlogPackageName '\v[a-z0-9@_+.-]+' contained skipwhite nextgroup=pacmanlogPackageVersion
     20 syn match pacmanlogPackageVersion '(.*)' contained
     21 
     22 syn match pacmanlogTransaction 'transaction \v(started|completed)$' contained
     23 syn match pacmanlogInstalled   '\v(re)?installed' contained nextgroup=pacmanlogPackageName
     24 syn match pacmanlogUpgraded    'upgraded'         contained nextgroup=pacmanlogPackageName
     25 syn match pacmanlogDowngraded  'downgraded'       contained nextgroup=pacmanlogPackageName
     26 syn match pacmanlogRemoved     'removed'          contained nextgroup=pacmanlogPackageName
     27 syn match pacmanlogWarning     'warning:.*$'      contained
     28 
     29 syn region pacmanlogALPMMsg start='\v(\[ALPM\] )@<=(transaction|(re)?installed|upgraded|downgraded|removed|warning)>' end='$' contained
     30 \ contains=pacmanlogTransaction,pacmanlogInstalled,pacmanlogUpgraded,pacmanlogDowngraded,pacmanlogRemoved,pacmanlogWarning,pacmanlogPackageName,pacmanlogPackgeVersion
     31 
     32 hi def link pacmanlogTime String
     33 hi def link pacmanlogTag  Type
     34 
     35 hi def link pacmanlogTransaction Special
     36 hi def link pacmanlogInstalled   Identifier
     37 hi def link pacmanlogRemoved     Repeat
     38 hi def link pacmanlogUpgraded    pacmanlogInstalled
     39 hi def link pacmanlogDowngraded  pacmanlogRemoved
     40 hi def link pacmanlogWarning     WarningMsg
     41 
     42 hi def link pacmanlogPackageName    Normal
     43 hi def link pacmanlogPackageVersion Comment
     44 
     45 let b:current_syntax = "pacmanlog"
     46 
     47 let &cpo = s:cpo_save
     48 unlet s:cpo_save