robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
c7a9404019
master
1" Vim syntax file 2" Previous Maintainer: Luca Saccarola <github.e41mv@aleeas.com> 3" Maintainer: This runtime file is looking for a new maintainer. 4" Language: hyprlang 5" Last Change: 2025 Aug 05 6 7if exists ( "b:current_syntax" ) 8finish 9endif 10let s: cpo = & cpo 11set cpo & vim 12 13let b: current_syntax = "hyprlang" 14 15syn case ignore 16 17syn match hyprCommand '^\s * \zs\S\+\ze\s * = 'contains = hyprVariable 18syn match hyprValue '=\s * \zs.\+\ze$ 'contains = hyprNumber , hyprFloat , hyprBoolean , hyprString , hyprColor , hyprModifier , hyprVariable , hyprComment 19 20syn match hyprVariable '\$\w\+ 'contained 21 22" Category 23syn region hyprCategory matchgroup = hyprCategoryD start = '^\s * \k\+\s * { 'end = '^\s * } 'contains = hyprCommand , hyprValue , hyprComment , hyprCategory , hyprCategoryD 24 25" Variables Types 26syn match hyprNumber '\% [ -+ ] \<\d\+\>\% [ % ] 'contained 27syn match hyprFloat '\% [ -+ ] \<\d\+\.\d\+\>\% [ % ] 'contained 28syn match hyprString "' [ ^' ] * ' "contained 29syn match hyprString '" [ ^" ] * " 'contained 30syn match hyprColor 'rgb(\(\w\|\d\)\{6}) 'contained 31syn match hyprColor 'rgba(\(\w\|\d\)\{8}) 'contained 32syn match hyprColor '0x\(\w\|\d\)\{8} 'contained 33syn keyword hyprBoolean true false yes no on off contained 34 35" Super Shift Alt Ctrl Control 36syn keyword hyprModifier contained 37 \super supershift superalt superctrl supercontrol 38 \super_shift super_alt super_ctrl super_control 39 \shift shiftsuper shiftalt shiftctrl shiftcontrol 40 \shift_super shift_alt shift_ctrl shift_control 41 \alt altsuper altshift altctrl altcontrol 42 \alt_super alt_shift alt_ctrl alt_control 43 \ctrl ctrlsuper ctrlshift ctrlalt ctrlcontrol 44 \ctrl_super ctrl_shift ctrl_alt ctrl_control 45 \control controlsuper controlshift controlalt controlctrl 46 \control_super control_shift control_alt control_ctrl 47 48" Comments 49syn match hyprComment '#. * $ ' 50 51" Link to default groups 52hi def link hyprVariable Identifier 53hi def link hyprCategoryD Special 54hi def link hyprComment Comment 55hi def link hyprNumber Constant 56hi def link hyprModifier Constant 57hi def link hyprFloat hyprNumber 58hi def link hyprBoolean Boolean 59hi def link hyprString String 60hi def link hyprColor Structure 61hi def link hyprCommand Keyword 62 63let & cpo = s: cpo 64unlet s: cpo 65" vim: ts=8 sts=2 sw=2 et