hyprlang.vim (2556B)
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 7 if exists("b:current_syntax") 8 finish 9 endif 10 let s:cpo= &cpo 11 set cpo&vim 12 13 let b:current_syntax = "hyprlang" 14 15 syn case ignore 16 17 syn match hyprCommand '^\s*\zs\S\+\ze\s*=' contains=hyprVariable 18 syn match hyprValue '=\s*\zs.\+\ze$' contains=hyprNumber,hyprFloat,hyprBoolean,hyprString,hyprColor,hyprModifier,hyprVariable,hyprComment 19 20 syn match hyprVariable '\$\w\+' contained 21 22 " Category 23 syn region hyprCategory matchgroup=hyprCategoryD start='^\s*\k\+\s*{' end='^\s*}' contains=hyprCommand,hyprValue,hyprComment,hyprCategory,hyprCategoryD 24 25 " Variables Types 26 syn match hyprNumber '\%[-+]\<\d\+\>\%[%]' contained 27 syn match hyprFloat '\%[-+]\<\d\+\.\d\+\>\%[%]' contained 28 syn match hyprString "'[^']*'" contained 29 syn match hyprString '"[^"]*"' contained 30 syn match hyprColor 'rgb(\(\w\|\d\)\{6})' contained 31 syn match hyprColor 'rgba(\(\w\|\d\)\{8})' contained 32 syn match hyprColor '0x\(\w\|\d\)\{8}' contained 33 syn keyword hyprBoolean true false yes no on off contained 34 35 " Super Shift Alt Ctrl Control 36 syn 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 49 syn match hyprComment '#.*$' 50 51 " Link to default groups 52 hi def link hyprVariable Identifier 53 hi def link hyprCategoryD Special 54 hi def link hyprComment Comment 55 hi def link hyprNumber Constant 56 hi def link hyprModifier Constant 57 hi def link hyprFloat hyprNumber 58 hi def link hyprBoolean Boolean 59 hi def link hyprString String 60 hi def link hyprColor Structure 61 hi def link hyprCommand Keyword 62 63 let &cpo = s:cpo 64 unlet s:cpo 65 " vim: ts=8 sts=2 sw=2 et