robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
c7f83f90ed
master
1" Vim syntax file 2" Maintainer: Thilo Six 3" Contact: vim-foo@xk2c-foo.de 4" :3s+-foo++g 5" Description: highlight dnsmasq configuration files 6" File: runtime/syntax/dnsmasq.vim 7" Version: 2.76 8" Last Change: 2015 Sep 27 9" 2026 Jun 23 by Vim project update dnsmasq keywords #20616 10" Modeline: vim: ts=8:sw=2:sts=2: 11" 12" License: VIM License 13" Vim is Charityware, see ":help Uganda" 14" 15" Options: You might want to add this to your vimrc: 16" 17" if &background == "dark" 18" let dnsmasq_backrgound_light = 0 19" else 20" let dnsmasq_backrgound_light = 1 21" endif 22" 23 24" quit when a syntax file was already loaded 25if exists ( "b:current_syntax" ) || & compatible 26finish 27endif 28 29let s: cpo_save = & cpo 30set cpo & vim 31 32if ! exists ( "b:dnsmasq_backrgound_light" ) 33if exists ( "dnsmasq_backrgound_light" ) 34let b: dnsmasq_backrgound_light = dnsmasq_backrgound_light 35else 36let b: dnsmasq_backrgound_light = 0 37endif 38endif 39 40 41" case on 42syn case match 43 44syn match DnsmasqValues "=. * "hs= s+1contains = DnsmasqComment , DnsmasqSpecial 45syn match DnsmasqSpecial display '=\|@\|,\|!\|: 'nextgroup = DnsmasqValues 46syn match DnsmasqSpecial "# " 47 48syn match DnsmasqIPv4 "\<\(\(25\_ [ 0-5 ] \|2\_ [ 0-4 ] \_ [ 0-9 ] \|\_ [ 01 ] \?\_ [ 0-9 ] \_ [ 0-9 ] \?\)\.\)\{3\}\(25\_ [ 0-5 ] \|2\_ [ 0-4 ] \_ [ 0-9 ] \|\_ [ 01 ] \?\_ [ 0-9 ] \_ [ 0-9 ] \?\)\> "nextgroup = DnsmasqSubnet2 , DnsmasqRange 49syn match DnsmasqSubnet "\<255.\(\(25\_ [ 0-5 ] \|2\_ [ 0-4 ] \_ [ 0-9 ] \|\_ [ 01 ] \?\_ [ 0-9 ] \_ [ 0-9 ] \?\)\.\)\{2\}\(25\_ [ 0-5 ] \|2\_ [ 0-4 ] \_ [ 0-9 ] \|\_ [ 01 ] \?\_ [ 0-9 ] \_ [ 0-9 ] \?\)\> " 50syn match DnsmasqSubnet2 contained "\/\( [ 0-4 ] \? [ 0-9 ] \)\> " 51syn match DnsmasqRange contained "- " 52syn match DnsmasqMac "\<\(\x\x\?:\)\{5}\x\x\? " 53 54syn match DnsmasqTime "\<\(\d\{1,3}\) [ hm ] \> " 55 56" String 57syn match DnsmasqString "\". * \" "contains = @Spell 58syn match DnsmasqString "'. * ' "contains = @Spell 59 60" Comments 61syn keyword DnsmasqTodo FIXME TODO XXX NOTE contained 62syn match DnsmasqComment "\(^\|\s\+\)#. * $ "contains = @Spell , DnsmasqTodo 63 64" highlight trailing spaces 65syn match DnsmasqTrailSpace "[ \t ] \+$ " 66syn match DnsmasqTrailSpace "[ \t ] \+$ "containedin = ALL 67 68syn match DnsmasqKeywordSpecial "\<set\>: "me= e-1 69syn match DnsmasqKeywordSpecial "\<tag\>: "me= e-1 70syn match DnsmasqKeywordSpecial ",\<static\> "hs= s+1contains = DnsmasqSpecial 71syn match DnsmasqKeywordSpecial ",\<infinite\> "hs= s+1contains = DnsmasqSpecial 72syn match DnsmasqKeywordSpecial "\<encap\>: "me= e-1 73syn match DnsmasqKeywordSpecial "\<interface\>: "me= e-1 74syn match DnsmasqKeywordSpecial "\<vi-encap\>: "me= e-1 75syn match DnsmasqKeywordSpecial "\<net\>: "me= e-1 76syn match DnsmasqKeywordSpecial "\<vendor\>: "me= e-1 77syn match DnsmasqKeywordSpecial "\<opt\>: "me= e-1 78syn match DnsmasqKeywordSpecial "\<option\>: "me= e-1 79syn match DnsmasqKeywordSpecial ",\<ignore\> "hs= s+1contains = DnsmasqSpecial 80syn match DnsmasqKeywordSpecial "\<id\>: "me= e-1 81 82syn match DnsmasqKeyword "^\s * \zsadd-cpe-id\> " 83syn match DnsmasqKeyword "^\s * \zsadd-mac\> " 84syn match DnsmasqKeyword "^\s * \zsadd-subnet\> " 85syn match DnsmasqKeyword "^\s * \zsaddn-hosts\> " 86syn match DnsmasqKeyword "^\s * \zsaddress\> " 87syn match DnsmasqKeyword "^\s * \zsalias\> " 88syn match DnsmasqKeyword "^\s * \zsall-servers\> " 89syn match DnsmasqKeyword "^\s * \zsauth-peer\> " 90syn match DnsmasqKeyword "^\s * \zsauth-sec-servers\> " 91syn match DnsmasqKeyword "^\s * \zsauth-server\> " 92syn match DnsmasqKeyword "^\s * \zsauth-soa\> " 93syn match DnsmasqKeyword "^\s * \zsauth-ttl\> " 94syn match DnsmasqKeyword "^\s * \zsauth-zone\> " 95syn match DnsmasqKeyword "^\s * \zsbind-dynamic\> " 96syn match DnsmasqKeyword "^\s * \zsbind-interfaces\> " 97syn match DnsmasqKeyword "^\s * \zsbogus-nxdomain\> " 98syn match DnsmasqKeyword "^\s * \zsbogus-priv\> " 99syn match DnsmasqKeyword "^\s * \zsbootp-dynamic\> " 100syn match DnsmasqKeyword "^\s * \zsbridge-interface\> " 101syn match DnsmasqKeyword "^\s * \zscaa-record\> " 102syn match DnsmasqKeyword "^\s * \zscache-rr\> " 103syn match DnsmasqKeyword "^\s * \zscache-size\> " 104syn match DnsmasqKeyword "^\s * \zsclear-on-reload\> " 105syn match DnsmasqKeyword "^\s * \zscname\> " 106syn match DnsmasqKeyword "^\s * \zsconf-dir\> " 107syn match DnsmasqKeyword "^\s * \zsconf-file\> " 108syn match DnsmasqKeyword "^\s * \zsconf-script\> " 109syn match DnsmasqKeyword "^\s * \zsconnmark-allowlist-enable\> " 110syn match DnsmasqKeyword "^\s * \zsconnmark-allowlist\> " 111syn match DnsmasqKeyword "^\s * \zsconntrack\> " 112syn match DnsmasqKeyword "^\s * \zsdhcp-alternate-port\> " 113syn match DnsmasqKeyword "^\s * \zsdhcp-authoritative\> " 114syn match DnsmasqKeyword "^\s * \zsdhcp-boot\> " 115syn match DnsmasqKeyword "^\s * \zsdhcp-broadcast\> " 116syn match DnsmasqKeyword "^\s * \zsdhcp-circuitid\> " 117syn match DnsmasqKeyword "^\s * \zsdhcp-client-update\> " 118syn match DnsmasqKeyword "^\s * \zsdhcp-duid\> " 119syn match DnsmasqKeyword "^\s * \zsdhcp-fqdn\> " 120syn match DnsmasqKeyword "^\s * \zsdhcp-generate-names\> " 121syn match DnsmasqKeyword "^\s * \zsdhcp-host\> " 122syn match DnsmasqKeyword "^\s * \zsdhcp-hostsdir\> " 123syn match DnsmasqKeyword "^\s * \zsdhcp-hostsfile\> " 124syn match DnsmasqKeyword "^\s * \zsdhcp-ignore-clid\> " 125syn match DnsmasqKeyword "^\s * \zsdhcp-ignore-names\> " 126syn match DnsmasqKeyword "^\s * \zsdhcp-ignore\> " 127syn match DnsmasqKeyword "^\s * \zsdhcp-lease-max\> " 128syn match DnsmasqKeyword "^\s * \zsdhcp-leasefile\> " 129syn match DnsmasqKeyword "^\s * \zsdhcp-luascript\> " 130syn match DnsmasqKeyword "^\s * \zsdhcp-mac\> " 131syn match DnsmasqKeyword "^\s * \zsdhcp-match\> " 132syn match DnsmasqKeyword "^\s * \zsdhcp-name-match\> " 133syn match DnsmasqKeyword "^\s * \zsdhcp-no-override\> " 134syn match DnsmasqKeyword "^\s * \zsdhcp-option-force\> " 135syn match DnsmasqKeyword "^\s * \zsdhcp-option-pxe\> " 136syn match DnsmasqKeyword "^\s * \zsdhcp-option\> " 137syn match DnsmasqKeyword "^\s * \zsdhcp-optsdir\> " 138syn match DnsmasqKeyword "^\s * \zsdhcp-optsfile\> " 139syn match DnsmasqKeyword "^\s * \zsdhcp-proxy\> " 140syn match DnsmasqKeyword "^\s * \zsdhcp-pxe-vendor\> " 141syn match DnsmasqKeyword "^\s * \zsdhcp-range\> " 142syn match DnsmasqKeyword "^\s * \zsdhcp-rapid-commit\> " 143syn match DnsmasqKeyword "^\s * \zsdhcp-relay\> " 144syn match DnsmasqKeyword "^\s * \zsdhcp-remoteid\> " 145syn match DnsmasqKeyword "^\s * \zsdhcp-reply-delay\> " 146syn match DnsmasqKeyword "^\s * \zsdhcp-script\> " 147syn match DnsmasqKeyword "^\s * \zsdhcp-scriptuser\> " 148syn match DnsmasqKeyword "^\s * \zsdhcp-sequential-ip\> " 149syn match DnsmasqKeyword "^\s * \zsdhcp-split-relay\> " 150syn match DnsmasqKeyword "^\s * \zsdhcp-subscrid\> " 151syn match DnsmasqKeyword "^\s * \zsdhcp-ttl\> " 152syn match DnsmasqKeyword "^\s * \zsdhcp-userclass\> " 153syn match DnsmasqKeyword "^\s * \zsdhcp-vendorclass\> " 154syn match DnsmasqKeyword "^\s * \zsdns-forward-max\> " 155syn match DnsmasqKeyword "^\s * \zsdns-loop-detect\> " 156syn match DnsmasqKeyword "^\s * \zsdns-rr\> " 157syn match DnsmasqKeyword "^\s * \zsdnssec-check-unsigned\> " 158syn match DnsmasqKeyword "^\s * \zsdnssec-debug\> " 159syn match DnsmasqKeyword "^\s * \zsdnssec-limits\> " 160syn match DnsmasqKeyword "^\s * \zsdnssec-no-timecheck\> " 161syn match DnsmasqKeyword "^\s * \zsdnssec-timestamp\> " 162syn match DnsmasqKeyword "^\s * \zsdnssec\> " 163syn match DnsmasqKeyword "^\s * \zsdo-0x20-encode\> " 164syn match DnsmasqKeyword "^\s * \zsdo-x20-encode\> " 165syn match DnsmasqKeyword "^\s * \zsdomain-needed\> " 166syn match DnsmasqKeyword "^\s * \zsdomain\> " 167syn match DnsmasqKeyword "^\s * \zsdumpfile\> " 168syn match DnsmasqKeyword "^\s * \zsdumpmask\> " 169syn match DnsmasqKeyword "^\s * \zsdynamic-host\> " 170syn match DnsmasqKeyword "^\s * \zsedns-packet-max\> " 171syn match DnsmasqKeyword "^\s * \zsenable-dbus\> " 172syn match DnsmasqKeyword "^\s * \zsenable-ra\> " 173syn match DnsmasqKeyword "^\s * \zsenable-tftp\> " 174syn match DnsmasqKeyword "^\s * \zsenable-ubus\> " 175syn match DnsmasqKeyword "^\s * \zsexcept-interface\> " 176syn match DnsmasqKeyword "^\s * \zsexpand-hosts\> " 177syn match DnsmasqKeyword "^\s * \zsfast-dns-retry\> " 178syn match DnsmasqKeyword "^\s * \zsfilter-AAAA\> " 179syn match DnsmasqKeyword "^\s * \zsfilter-A\> " 180syn match DnsmasqKeyword "^\s * \zsfilter-rr\> " 181syn match DnsmasqKeyword "^\s * \zsfilterwin2k\> " 182syn match DnsmasqKeyword "^\s * \zsgroup\> " 183syn match DnsmasqKeyword "^\s * \zshelp\> " 184syn match DnsmasqKeyword "^\s * \zshost-record\> " 185syn match DnsmasqKeyword "^\s * \zshostsdir\> " 186syn match DnsmasqKeyword "^\s * \zsignore-address\> " 187syn match DnsmasqKeyword "^\s * \zsinterface-name\> " 188syn match DnsmasqKeyword "^\s * \zsinterface\> " 189syn match DnsmasqKeyword "^\s * \zsipset\> " 190syn match DnsmasqKeyword "^\s * \zskeep-in-foreground\> " 191syn match DnsmasqKeyword "^\s * \zsleasefile-ro\> " 192syn match DnsmasqKeyword "^\s * \zsleasequery\> " 193syn match DnsmasqKeyword "^\s * \zslisten-address\> " 194syn match DnsmasqKeyword "^\s * \zslocal-service\> " 195syn match DnsmasqKeyword "^\s * \zslocal-ttl\> " 196syn match DnsmasqKeyword "^\s * \zslocal\> " 197syn match DnsmasqKeyword "^\s * \zslocalise-queries\> " 198syn match DnsmasqKeyword "^\s * \zslocalmx\> " 199syn match DnsmasqKeyword "^\s * \zslog-async\> " 200syn match DnsmasqKeyword "^\s * \zslog-debug\> " 201syn match DnsmasqKeyword "^\s * \zslog-dhcp\> " 202syn match DnsmasqKeyword "^\s * \zslog-facility\> " 203syn match DnsmasqKeyword "^\s * \zslog-malloc\> " 204syn match DnsmasqKeyword "^\s * \zslog-queries\> " 205syn match DnsmasqKeyword "^\s * \zsmax-cache-ttl\> " 206syn match DnsmasqKeyword "^\s * \zsmax-port\> " 207syn match DnsmasqKeyword "^\s * \zsmax-tcp-connections\> " 208syn match DnsmasqKeyword "^\s * \zsmax-ttl\> " 209syn match DnsmasqKeyword "^\s * \zsmin-cache-ttl\> " 210syn match DnsmasqKeyword "^\s * \zsmin-port\> " 211syn match DnsmasqKeyword "^\s * \zsmx-host\> " 212syn match DnsmasqKeyword "^\s * \zsmx-target\> " 213syn match DnsmasqKeyword "^\s * \zsnaptr-record\> " 214syn match DnsmasqKeyword "^\s * \zsneg-ttl\> " 215syn match DnsmasqKeyword "^\s * \zsnftset\> " 216syn match DnsmasqKeyword "^\s * \zsno-0x20-encode\> " 217syn match DnsmasqKeyword "^\s * \zsno-daemon\> " 218syn match DnsmasqKeyword "^\s * \zsno-dhcp-interface\> " 219syn match DnsmasqKeyword "^\s * \zsno-dhcpv4-interface\> " 220syn match DnsmasqKeyword "^\s * \zsno-dhcpv6-interface\> " 221syn match DnsmasqKeyword "^\s * \zsno-hosts\> " 222syn match DnsmasqKeyword "^\s * \zsno-ident\> " 223syn match DnsmasqKeyword "^\s * \zsno-negcache\> " 224syn match DnsmasqKeyword "^\s * \zsno-ping\> " 225syn match DnsmasqKeyword "^\s * \zsno-poll\> " 226syn match DnsmasqKeyword "^\s * \zsno-resolv\> " 227syn match DnsmasqKeyword "^\s * \zsno-round-robin\> " 228syn match DnsmasqKeyword "^\s * \zspid-file\> " 229syn match DnsmasqKeyword "^\s * \zsport-limit\> " 230syn match DnsmasqKeyword "^\s * \zsport\> " 231syn match DnsmasqKeyword "^\s * \zsproxy-dnssec\> " 232syn match DnsmasqKeyword "^\s * \zsptr-record\> " 233syn match DnsmasqKeyword "^\s * \zspxe-prompt\> " 234syn match DnsmasqKeyword "^\s * \zspxe-service\> " 235syn match DnsmasqKeyword "^\s * \zsquery-port\> " 236syn match DnsmasqKeyword "^\s * \zsquiet-dhcp6\> " 237syn match DnsmasqKeyword "^\s * \zsquiet-dhcp\> " 238syn match DnsmasqKeyword "^\s * \zsquiet-ra\> " 239syn match DnsmasqKeyword "^\s * \zsquiet-tftp\> " 240syn match DnsmasqKeyword "^\s * \zsra-param\> " 241syn match DnsmasqKeyword "^\s * \zsread-ethers\> " 242syn match DnsmasqKeyword "^\s * \zsrebind-domain-ok\> " 243syn match DnsmasqKeyword "^\s * \zsrebind-localhost-ok\> " 244syn match DnsmasqKeyword "^\s * \zsresolv-file\> " 245syn match DnsmasqKeyword "^\s * \zsrev-server\> " 246syn match DnsmasqKeyword "^\s * \zsscript-arp\> " 247syn match DnsmasqKeyword "^\s * \zsscript-on-renewal\> " 248syn match DnsmasqKeyword "^\s * \zsselfmx\> " 249syn match DnsmasqKeyword "^\s * \zsserver\> " 250syn match DnsmasqKeyword "^\s * \zsservers-file\> " 251syn match DnsmasqKeyword "^\s * \zsshared-network\> " 252syn match DnsmasqKeyword "^\s * \zssrv-host\> " 253syn match DnsmasqKeyword "^\s * \zsstop-dns-rebind\> " 254syn match DnsmasqKeyword "^\s * \zsstrict-order\> " 255syn match DnsmasqKeyword "^\s * \zsstrip-mac\> " 256syn match DnsmasqKeyword "^\s * \zsstrip-subnet\> " 257syn match DnsmasqKeyword "^\s * \zssynth-domain\> " 258syn match DnsmasqKeyword "^\s * \zstag-if\> " 259syn match DnsmasqKeyword "^\s * \zstest\> " 260syn match DnsmasqKeyword "^\s * \zstftp-lowercase\> " 261syn match DnsmasqKeyword "^\s * \zstftp-max\> " 262syn match DnsmasqKeyword "^\s * \zstftp-mtu\> " 263syn match DnsmasqKeyword "^\s * \zstftp-no-blocksize\> " 264syn match DnsmasqKeyword "^\s * \zstftp-no-fail\> " 265syn match DnsmasqKeyword "^\s * \zstftp-port-range\> " 266syn match DnsmasqKeyword "^\s * \zstftp-root\> " 267syn match DnsmasqKeyword "^\s * \zstftp-secure\> " 268syn match DnsmasqKeyword "^\s * \zstftp-single-port\> " 269syn match DnsmasqKeyword "^\s * \zstftp-unique-root\> " 270syn match DnsmasqKeyword "^\s * \zstrust-anchor\> " 271syn match DnsmasqKeyword "^\s * \zstxt-record\> " 272syn match DnsmasqKeyword "^\s * \zsumbrella\> " 273syn match DnsmasqKeyword "^\s * \zsuse-stale-cache\> " 274syn match DnsmasqKeyword "^\s * \zsuser\> " 275syn match DnsmasqKeyword "^\s * \zsversion\> " 276 277 278if b: dnsmasq_backrgound_light == 1 279hi def DnsmasqKeyword ctermfg = DarkGreen guifg = DarkGreen 280else 281hi def link DnsmasqKeyword Keyword 282endif 283hi def link DnsmasqKeywordSpecial Type 284hi def link DnsmasqTodo Todo 285hi def link DnsmasqSpecial Constant 286hi def link DnsmasqIPv4 Identifier 287hi def link DnsmasqSubnet2 DnsmasqSubnet 288hi def link DnsmasqSubnet DnsmasqMac 289hi def link DnsmasqRange DnsmasqMac 290hi def link DnsmasqMac Preproc 291hi def link DnsmasqTime Preproc 292hi def link DnsmasqComment Comment 293hi def link DnsmasqTrailSpace DiffDelete 294hi def link DnsmasqString Constant 295hi def link DnsmasqValues Normal 296 297let b: current_syntax = "dnsmasq" 298 299let & cpo = s: cpo_save 300unlet s: cpo_save 301