robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
5f15c0e959
master
1" Vim syntax file 2" Language: strace output 3" Maintainer: David Necas (Yeti) <yeti@physics.muni.cz> 4" Last Change: 2022 Jan 29 5" 2026 Aug 10 by Vim Project: highlight strack trace as comment #20998 6 7" Setup 8" quit when a syntax file was already loaded 9if exists ( "b:current_syntax" ) 10finish 11endif 12 13syn case match 14 15" Parse the line 16syn match straceSpecialChar "\\\o\{1,3}\|\\. "contained 17syn region straceString start = +" +skip = +\\\\\|\\" +end = +" +contains = straceSpecialChar oneline 18syn match straceNumber "\W [ +- ] \=\(\d\+\)\=\.\=\d\+\( [ eE ][ +- ] \=\d\+\)\= "lc= 1 19syn match straceNumber "\W0x\x\+ "lc= 1 20syn match straceNumberRHS "\W\(0x\x\+\|-\=\d\+\) "lc= 1contained 21syn match straceOtherRHS "? "contained 22syn match straceConstant "[ A-Z_ ] \{2,} " 23syn region straceVerbosed start = "( "end = ") "matchgroup = Normal contained oneline 24syn region straceReturned start = "\s=\s "end = "$ "contains = StraceEquals , straceNumberRHS , straceOtherRHS , straceConstant , straceVerbosed oneline transparent 25syn match straceEquals "\s=\s "ms= s+1, me= e-1 26syn match straceParenthesis "[][ (){} ] " 27syn match straceSysCall "^\w\+ " 28syn match straceOtherPID "^\[ [ ^ ] ] * \] "contains = stracePID , straceNumber nextgroup = straceSysCallEmbed skipwhite 29syn match straceSysCallEmbed "\w\+ "contained 30syn keyword stracePID pid contained 31syn match straceOperator "[ -+=*/!%&|:, ] " 32syn region straceComment start = "/\* "end = "\*/ "oneline 33syn match straceStackTrace "^ * > . * $ " 34 35" Define the default highlighting 36 37hi def link straceComment Comment 38hi def link straceVerbosed Comment 39hi def link straceStackTrace Comment 40hi def link stracePID PreProc 41hi def link straceNumber Number 42hi def link straceNumberRHS Type 43hi def link straceOtherRHS Type 44hi def link straceString String 45hi def link straceConstant Function 46hi def link straceEquals Type 47hi def link straceSysCallEmbed straceSysCall 48hi def link straceSysCall Statement 49hi def link straceParenthesis Statement 50hi def link straceOperator Normal 51hi def link straceSpecialChar Special 52hi def link straceOtherPID PreProc 53 54 55let b: current_syntax = "strace"