robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
855a2a75e6
master
1" Vim syntax file 2" Maintainer: Christian Brabandt <cb@256bit.org> 3" Previous Maintainer: Nikolai Weibull <now@bitwi.se> 4" Latest Revision: 2025 Jan 20 5" License: Vim (see :h license) 6" Repository: https://github.com/chrisbra/vim-kconfig 7 8if exists ( "b:current_syntax" ) 9finish 10endif 11 12let s: cpo_save = & cpo 13set cpo & vim 14 15exe "syn sync minlines=" . get ( g:, 'kconfig_minlines' , 50 ) 16 17if exists ( "g:kconfig_syntax_heavy" ) 18 19syn match kconfigBegin '^ 'nextgroup = kconfigKeyword 20 \skipwhite 21 22syn keyword kconfigTodo contained TODO FIXME XXX NOTE 23 24syn match kconfigComment display '#. * $ 'contains = kconfigTodo 25 26syn keyword kconfigKeyword config nextgroup = kconfigSymbol 27 \skipwhite 28 29syn keyword kconfigKeyword menuconfig nextgroup = kconfigSymbol 30 \skipwhite 31 32syn keyword kconfigKeyword comment menu mainmenu 33 \nextgroup = kconfigKeywordPrompt 34 \skipwhite 35 36syn keyword kconfigKeyword choice 37 \nextgroup = @kconfigConfigOptions 38 \skipwhite skipnl 39 40syn keyword kconfigKeyword endmenu endchoice 41 42syn keyword kconfigPreProc source 43 \nextgroup = kconfigPath 44 \skipwhite 45 46" TODO: This is a hack. The who .*Expr stuff should really be generated so 47" that we can reuse it for various nextgroups. 48syn keyword kconfigConditional if endif 49 \nextgroup = @kconfigConfigOptionIfExpr 50 \skipwhite 51 52syn match kconfigKeywordPrompt '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 53 \contained 54 \nextgroup = @kconfigConfigOptions 55 \skipwhite skipnl 56 57syn match kconfigPath '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * "\|\S\+ ' 58 \contained 59 60syn match kconfigSymbol '\<\k\+\> ' 61 \contained 62 \nextgroup = @kconfigConfigOptions 63 \skipwhite skipnl 64 65" FIXME: There is – probably – no reason to cluster these instead of just 66" defining them in the same group. 67syn cluster kconfigConfigOptions contains = kconfigTypeDefinition , 68 \kconfigInputPrompt , 69 \kconfigDefaultValue , 70 \kconfigDependencies , 71 \kconfigReverseDependencies , 72 \kconfigNumericalRanges , 73 \kconfigHelpText , 74 \kconfigDefBool , 75 \kconfigOptional 76 77syn keyword kconfigTypeDefinition bool boolean tristate string hex int 78 \contained 79 \nextgroup = kconfigTypeDefPrompt , 80 \@kconfigConfigOptions 81 \skipwhite skipnl 82 83syn match kconfigTypeDefPrompt '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 84 \contained 85 \nextgroup = kconfigConfigOptionIf , 86 \@kconfigConfigOptions 87 \skipwhite skipnl 88 89syn match kconfigTypeDefPrompt "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 90 \contained 91 \nextgroup = kconfigConfigOptionIf , 92 \@kconfigConfigOptions 93 \skipwhite skipnl 94 95syn keyword kconfigInputPrompt prompt 96 \contained 97 \nextgroup = kconfigPromptPrompt 98 \skipwhite 99 100syn match kconfigPromptPrompt '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 101 \contained 102 \nextgroup = kconfigConfigOptionIf , 103 \@kconfigConfigOptions 104 \skipwhite skipnl 105 106syn match kconfigPromptPrompt "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 107 \contained 108 \nextgroup = kconfigConfigOptionIf , 109 \@kconfigConfigOptions 110 \skipwhite skipnl 111 112syn keyword kconfigDefaultValue default 113 \contained 114 \nextgroup = @kconfigConfigOptionExpr 115 \skipwhite 116 117syn match kconfigDependencies 'depends on\|requires ' 118 \contained 119 \nextgroup = @kconfigConfigOptionIfExpr 120 \skipwhite 121 122syn keyword kconfigReverseDependencies select 123 \contained 124 \nextgroup = @kconfigRevDepSymbol 125 \skipwhite 126 127syn cluster kconfigRevDepSymbol contains = kconfigRevDepCSymbol , 128 \kconfigRevDepNCSymbol 129 130syn match kconfigRevDepCSymbol '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 131 \contained 132 \nextgroup = kconfigConfigOptionIf , 133 \@kconfigConfigOptions 134 \skipwhite skipnl 135 136syn match kconfigRevDepCSymbol "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 137 \contained 138 \nextgroup = kconfigConfigOptionIf , 139 \@kconfigConfigOptions 140 \skipwhite skipnl 141 142syn match kconfigRevDepNCSymbol '\<\k\+\> ' 143 \contained 144 \nextgroup = kconfigConfigOptionIf , 145 \@kconfigConfigOptions 146 \skipwhite skipnl 147 148syn keyword kconfigNumericalRanges range 149 \contained 150 \nextgroup = @kconfigRangeSymbol 151 \skipwhite 152 153syn cluster kconfigRangeSymbol contains = kconfigRangeCSymbol , 154 \kconfigRangeNCSymbol 155 156syn match kconfigRangeCSymbol '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 157 \contained 158 \nextgroup = @kconfigRangeSymbol2 159 \skipwhite skipnl 160 161syn match kconfigRangeCSymbol "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 162 \contained 163 \nextgroup = @kconfigRangeSymbol2 164 \skipwhite skipnl 165 166syn match kconfigRangeNCSymbol '\<\k\+\> ' 167 \contained 168 \nextgroup = @kconfigRangeSymbol2 169 \skipwhite skipnl 170 171syn cluster kconfigRangeSymbol2 contains = kconfigRangeCSymbol2 , 172 \kconfigRangeNCSymbol2 173 174syn match kconfigRangeCSymbol2 "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 175 \contained 176 \nextgroup = kconfigConfigOptionIf , 177 \@kconfigConfigOptions 178 \skipwhite skipnl 179 180syn match kconfigRangeNCSymbol2 '\<\k\+\> ' 181 \contained 182 \nextgroup = kconfigConfigOptionIf , 183 \@kconfigConfigOptions 184 \skipwhite skipnl 185 186syn region kconfigHelpText contained 187 \matchgroup = kconfigConfigOption 188 \start = '\%(help\|---help---\)\ze\s * \n\z(\s\+\) ' 189 \skip = '^$ ' 190 \end = '^\z1\@! ' 191 \nextgroup = @kconfigConfigOptions 192 \skipwhite skipnl 193 194" XXX: Undocumented 195syn keyword kconfigDefBool def_bool 196 \contained 197 \nextgroup = @kconfigDefBoolSymbol 198 \skipwhite 199 200syn cluster kconfigDefBoolSymbol contains = kconfigDefBoolCSymbol , 201 \kconfigDefBoolNCSymbol 202 203syn match kconfigDefBoolCSymbol '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 204 \contained 205 \nextgroup = kconfigConfigOptionIf , 206 \@kconfigConfigOptions 207 \skipwhite skipnl 208 209syn match kconfigDefBoolCSymbol "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 210 \contained 211 \nextgroup = kconfigConfigOptionIf , 212 \@kconfigConfigOptions 213 \skipwhite skipnl 214 215syn match kconfigDefBoolNCSymbol '\<\k\+\> ' 216 \contained 217 \nextgroup = kconfigConfigOptionIf , 218 \@kconfigConfigOptions 219 \skipwhite skipnl 220 221" XXX: This is actually only a valid option for “choice”, but treating it 222" specially would require a lot of extra groups. 223syn keyword kconfigOptional optional 224 \contained 225 \nextgroup = @kconfigConfigOptions 226 \skipwhite skipnl 227 228syn keyword kconfigConfigOptionIf if 229 \contained 230 \nextgroup = @kconfigConfigOptionIfExpr 231 \skipwhite 232 233syn cluster kconfigConfigOptionIfExpr contains = @kconfigConfOptIfExprSym , 234 \kconfigConfOptIfExprNeg , 235 \kconfigConfOptIfExprGroup 236 237syn cluster kconfigConfOptIfExprSym contains = kconfigConfOptIfExprCSym , 238 \kconfigConfOptIfExprNCSym 239 240syn match kconfigConfOptIfExprCSym '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 241 \contained 242 \nextgroup = @kconfigConfigOptions , 243 \kconfigConfOptIfExprAnd , 244 \kconfigConfOptIfExprOr , 245 \kconfigConfOptIfExprEq , 246 \kconfigConfOptIfExprNEq 247 \skipwhite skipnl 248 249syn match kconfigConfOptIfExprCSym "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 250 \contained 251 \nextgroup = @kconfigConfigOptions , 252 \kconfigConfOptIfExprAnd , 253 \kconfigConfOptIfExprOr , 254 \kconfigConfOptIfExprEq , 255 \kconfigConfOptIfExprNEq 256 \skipwhite skipnl 257 258syn match kconfigConfOptIfExprNCSym '\<\k\+\> ' 259 \contained 260 \nextgroup = @kconfigConfigOptions , 261 \kconfigConfOptIfExprAnd , 262 \kconfigConfOptIfExprOr , 263 \kconfigConfOptIfExprEq , 264 \kconfigConfOptIfExprNEq 265 \skipwhite skipnl 266 267syn cluster kconfigConfOptIfExprSym2 contains = kconfigConfOptIfExprCSym2 , 268 \kconfigConfOptIfExprNCSym2 269 270syn match kconfigConfOptIfExprEq '= ' 271 \contained 272 \nextgroup = @kconfigConfOptIfExprSym2 273 \skipwhite 274 275syn match kconfigConfOptIfExprNEq '!= ' 276 \contained 277 \nextgroup = @kconfigConfOptIfExprSym2 278 \skipwhite 279 280syn match kconfigConfOptIfExprCSym2 "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 281 \contained 282 \nextgroup = @kconfigConfigOptions , 283 \kconfigConfOptIfExprAnd , 284 \kconfigConfOptIfExprOr 285 \skipwhite skipnl 286 287syn match kconfigConfOptIfExprNCSym2 '\<\k\+\> ' 288 \contained 289 \nextgroup = @kconfigConfigOptions , 290 \kconfigConfOptIfExprAnd , 291 \kconfigConfOptIfExprOr 292 \skipwhite skipnl 293 294syn match kconfigConfOptIfExprNeg '! ' 295 \contained 296 \nextgroup = @kconfigConfigOptionIfExpr 297 \skipwhite 298 299syn match kconfigConfOptIfExprAnd '&& ' 300 \contained 301 \nextgroup = @kconfigConfigOptionIfExpr 302 \skipwhite 303 304syn match kconfigConfOptIfExprOr '|| ' 305 \contained 306 \nextgroup = @kconfigConfigOptionIfExpr 307 \skipwhite 308 309syn match kconfigConfOptIfExprGroup '( ' 310 \contained 311 \nextgroup = @kconfigConfigOptionIfGExp 312 \skipwhite 313 314" TODO: hm, this kind of recursion doesn't work right. We need another set of 315" expressions that have kconfigConfigOPtionIfGExp as nextgroup and a matcher 316" for '(' that sets it all off. 317syn cluster kconfigConfigOptionIfGExp contains = @kconfigConfOptIfGExpSym , 318 \kconfigConfOptIfGExpNeg , 319 \kconfigConfOptIfExprGroup 320 321syn cluster kconfigConfOptIfGExpSym contains = kconfigConfOptIfGExpCSym , 322 \kconfigConfOptIfGExpNCSym 323 324syn match kconfigConfOptIfGExpCSym '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 325 \contained 326 \nextgroup = @kconfigConfigIf , 327 \kconfigConfOptIfGExpAnd , 328 \kconfigConfOptIfGExpOr , 329 \kconfigConfOptIfGExpEq , 330 \kconfigConfOptIfGExpNEq 331 \skipwhite skipnl 332 333syn match kconfigConfOptIfGExpCSym "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 334 \contained 335 \nextgroup = @kconfigConfigIf , 336 \kconfigConfOptIfGExpAnd , 337 \kconfigConfOptIfGExpOr , 338 \kconfigConfOptIfGExpEq , 339 \kconfigConfOptIfGExpNEq 340 \skipwhite skipnl 341 342syn match kconfigConfOptIfGExpNCSym '\<\k\+\> ' 343 \contained 344 \nextgroup = kconfigConfOptIfExprGrpE , 345 \kconfigConfOptIfGExpAnd , 346 \kconfigConfOptIfGExpOr , 347 \kconfigConfOptIfGExpEq , 348 \kconfigConfOptIfGExpNEq 349 \skipwhite skipnl 350 351syn cluster kconfigConfOptIfGExpSym2 contains = kconfigConfOptIfGExpCSym2 , 352 \kconfigConfOptIfGExpNCSym2 353 354syn match kconfigConfOptIfGExpEq '= ' 355 \contained 356 \nextgroup = @kconfigConfOptIfGExpSym2 357 \skipwhite 358 359syn match kconfigConfOptIfGExpNEq '!= ' 360 \contained 361 \nextgroup = @kconfigConfOptIfGExpSym2 362 \skipwhite 363 364syn match kconfigConfOptIfGExpCSym2 '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 365 \contained 366 \nextgroup = kconfigConfOptIfExprGrpE , 367 \kconfigConfOptIfGExpAnd , 368 \kconfigConfOptIfGExpOr 369 \skipwhite skipnl 370 371syn match kconfigConfOptIfGExpCSym2 "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 372 \contained 373 \nextgroup = kconfigConfOptIfExprGrpE , 374 \kconfigConfOptIfGExpAnd , 375 \kconfigConfOptIfGExpOr 376 \skipwhite skipnl 377 378syn match kconfigConfOptIfGExpNCSym2 '\<\k\+\> ' 379 \contained 380 \nextgroup = kconfigConfOptIfExprGrpE , 381 \kconfigConfOptIfGExpAnd , 382 \kconfigConfOptIfGExpOr 383 \skipwhite skipnl 384 385syn match kconfigConfOptIfGExpNeg '! ' 386 \contained 387 \nextgroup = @kconfigConfigOptionIfGExp 388 \skipwhite 389 390syn match kconfigConfOptIfGExpAnd '&& ' 391 \contained 392 \nextgroup = @kconfigConfigOptionIfGExp 393 \skipwhite 394 395syn match kconfigConfOptIfGExpOr '|| ' 396 \contained 397 \nextgroup = @kconfigConfigOptionIfGExp 398 \skipwhite 399 400syn match kconfigConfOptIfExprGrpE ') ' 401 \contained 402 \nextgroup = @kconfigConfigOptions , 403 \kconfigConfOptIfExprAnd , 404 \kconfigConfOptIfExprOr 405 \skipwhite skipnl 406 407 408syn cluster kconfigConfigOptionExpr contains = @kconfigConfOptExprSym , 409 \kconfigConfOptExprNeg , 410 \kconfigConfOptExprGroup 411 412syn cluster kconfigConfOptExprSym contains = kconfigConfOptExprCSym , 413 \kconfigConfOptExprNCSym 414 415syn match kconfigConfOptExprCSym '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 416 \contained 417 \nextgroup = kconfigConfigOptionIf , 418 \kconfigConfOptExprAnd , 419 \kconfigConfOptExprOr , 420 \kconfigConfOptExprEq , 421 \kconfigConfOptExprNEq , 422 \@kconfigConfigOptions 423 \skipwhite skipnl 424 425syn match kconfigConfOptExprCSym "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 426 \contained 427 \nextgroup = kconfigConfigOptionIf , 428 \kconfigConfOptExprAnd , 429 \kconfigConfOptExprOr , 430 \kconfigConfOptExprEq , 431 \kconfigConfOptExprNEq , 432 \@kconfigConfigOptions 433 \skipwhite skipnl 434 435syn match kconfigConfOptExprNCSym '\<\k\+\> ' 436 \contained 437 \nextgroup = kconfigConfigOptionIf , 438 \kconfigConfOptExprAnd , 439 \kconfigConfOptExprOr , 440 \kconfigConfOptExprEq , 441 \kconfigConfOptExprNEq , 442 \@kconfigConfigOptions 443 \skipwhite skipnl 444 445syn cluster kconfigConfOptExprSym2 contains = kconfigConfOptExprCSym2 , 446 \kconfigConfOptExprNCSym2 447 448syn match kconfigConfOptExprEq '= ' 449 \contained 450 \nextgroup = @kconfigConfOptExprSym2 451 \skipwhite 452 453syn match kconfigConfOptExprNEq '!= ' 454 \contained 455 \nextgroup = @kconfigConfOptExprSym2 456 \skipwhite 457 458syn match kconfigConfOptExprCSym2 '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 459 \contained 460 \nextgroup = kconfigConfigOptionIf , 461 \kconfigConfOptExprAnd , 462 \kconfigConfOptExprOr , 463 \@kconfigConfigOptions 464 \skipwhite skipnl 465 466syn match kconfigConfOptExprCSym2 "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 467 \contained 468 \nextgroup = kconfigConfigOptionIf , 469 \kconfigConfOptExprAnd , 470 \kconfigConfOptExprOr , 471 \@kconfigConfigOptions 472 \skipwhite skipnl 473 474syn match kconfigConfOptExprNCSym2 '\<\k\+\> ' 475 \contained 476 \nextgroup = kconfigConfigOptionIf , 477 \kconfigConfOptExprAnd , 478 \kconfigConfOptExprOr , 479 \@kconfigConfigOptions 480 \skipwhite skipnl 481 482syn match kconfigConfOptExprNeg '! ' 483 \contained 484 \nextgroup = @kconfigConfigOptionExpr 485 \skipwhite 486 487syn match kconfigConfOptExprAnd '&& ' 488 \contained 489 \nextgroup = @kconfigConfigOptionExpr 490 \skipwhite 491 492syn match kconfigConfOptExprOr '|| ' 493 \contained 494 \nextgroup = @kconfigConfigOptionExpr 495 \skipwhite 496 497syn match kconfigConfOptExprGroup '( ' 498 \contained 499 \nextgroup = @kconfigConfigOptionGExp 500 \skipwhite 501 502syn cluster kconfigConfigOptionGExp contains = @kconfigConfOptGExpSym , 503 \kconfigConfOptGExpNeg , 504 \kconfigConfOptGExpGroup 505 506syn cluster kconfigConfOptGExpSym contains = kconfigConfOptGExpCSym , 507 \kconfigConfOptGExpNCSym 508 509syn match kconfigConfOptGExpCSym '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 510 \contained 511 \nextgroup = kconfigConfOptExprGrpE , 512 \kconfigConfOptGExpAnd , 513 \kconfigConfOptGExpOr , 514 \kconfigConfOptGExpEq , 515 \kconfigConfOptGExpNEq 516 \skipwhite skipnl 517 518syn match kconfigConfOptGExpCSym "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 519 \contained 520 \nextgroup = kconfigConfOptExprGrpE , 521 \kconfigConfOptGExpAnd , 522 \kconfigConfOptGExpOr , 523 \kconfigConfOptGExpEq , 524 \kconfigConfOptGExpNEq 525 \skipwhite skipnl 526 527syn match kconfigConfOptGExpNCSym '\<\k\+\> ' 528 \contained 529 \nextgroup = kconfigConfOptExprGrpE , 530 \kconfigConfOptGExpAnd , 531 \kconfigConfOptGExpOr , 532 \kconfigConfOptGExpEq , 533 \kconfigConfOptGExpNEq 534 \skipwhite skipnl 535 536syn cluster kconfigConfOptGExpSym2 contains = kconfigConfOptGExpCSym2 , 537 \kconfigConfOptGExpNCSym2 538 539syn match kconfigConfOptGExpEq '= ' 540 \contained 541 \nextgroup = @kconfigConfOptGExpSym2 542 \skipwhite 543 544syn match kconfigConfOptGExpNEq '!= ' 545 \contained 546 \nextgroup = @kconfigConfOptGExpSym2 547 \skipwhite 548 549syn match kconfigConfOptGExpCSym2 '" [ ^"\\ ] * \%(\\. [ ^"\\ ] * \) * " ' 550 \contained 551 \nextgroup = kconfigConfOptExprGrpE , 552 \kconfigConfOptGExpAnd , 553 \kconfigConfOptGExpOr 554 \skipwhite skipnl 555 556syn match kconfigConfOptGExpCSym2 "' [ ^'\\ ] * \%(\\. [ ^'\\ ] * \) * ' " 557 \contained 558 \nextgroup = kconfigConfOptExprGrpE , 559 \kconfigConfOptGExpAnd , 560 \kconfigConfOptGExpOr 561 \skipwhite skipnl 562 563syn match kconfigConfOptGExpNCSym2 '\<\k\+\> ' 564 \contained 565 \nextgroup = kconfigConfOptExprGrpE , 566 \kconfigConfOptGExpAnd , 567 \kconfigConfOptGExpOr 568 \skipwhite skipnl 569 570syn match kconfigConfOptGExpNeg '! ' 571 \contained 572 \nextgroup = @kconfigConfigOptionGExp 573 \skipwhite 574 575syn match kconfigConfOptGExpAnd '&& ' 576 \contained 577 \nextgroup = @kconfigConfigOptionGExp 578 \skipwhite 579 580syn match kconfigConfOptGExpOr '|| ' 581 \contained 582 \nextgroup = @kconfigConfigOptionGExp 583 \skipwhite 584 585syn match kconfigConfOptExprGrpE ') ' 586 \contained 587 \nextgroup = kconfigConfigOptionIf , 588 \kconfigConfOptExprAnd , 589 \kconfigConfOptExprOr 590 \skipwhite skipnl 591 592hi def link kconfigTodo Todo 593hi def link kconfigComment Comment 594hi def link kconfigKeyword Keyword 595hi def link kconfigPreProc PreProc 596hi def link kconfigConditional Conditional 597hi def link kconfigPrompt String 598hi def link kconfigKeywordPrompt kconfigPrompt 599hi def link kconfigPath String 600hi def link kconfigSymbol String 601hi def link kconfigConstantSymbol Constant 602hi def link kconfigConfigOption Type 603hi def link kconfigTypeDefinition kconfigConfigOption 604hi def link kconfigTypeDefPrompt kconfigPrompt 605hi def link kconfigInputPrompt kconfigConfigOption 606hi def link kconfigPromptPrompt kconfigPrompt 607hi def link kconfigDefaultValue kconfigConfigOption 608hi def link kconfigDependencies kconfigConfigOption 609hi def link kconfigReverseDependencies kconfigConfigOption 610hi def link kconfigRevDepCSymbol kconfigConstantSymbol 611hi def link kconfigRevDepNCSymbol kconfigSymbol 612hi def link kconfigNumericalRanges kconfigConfigOption 613hi def link kconfigRangeCSymbol kconfigConstantSymbol 614hi def link kconfigRangeNCSymbol kconfigSymbol 615hi def link kconfigRangeCSymbol2 kconfigConstantSymbol 616hi def link kconfigRangeNCSymbol2 kconfigSymbol 617hi def link kconfigHelpText Normal 618hi def link kconfigDefBool kconfigConfigOption 619hi def link kconfigDefBoolCSymbol kconfigConstantSymbol 620hi def link kconfigDefBoolNCSymbol kconfigSymbol 621hi def link kconfigOptional kconfigConfigOption 622hi def link kconfigConfigOptionIf Conditional 623hi def link kconfigConfOptIfExprCSym kconfigConstantSymbol 624hi def link kconfigConfOptIfExprNCSym kconfigSymbol 625hi def link kconfigOperator Operator 626hi def link kconfigConfOptIfExprEq kconfigOperator 627hi def link kconfigConfOptIfExprNEq kconfigOperator 628hi def link kconfigConfOptIfExprCSym2 kconfigConstantSymbol 629hi def link kconfigConfOptIfExprNCSym2 kconfigSymbol 630hi def link kconfigConfOptIfExprNeg kconfigOperator 631hi def link kconfigConfOptIfExprAnd kconfigOperator 632hi def link kconfigConfOptIfExprOr kconfigOperator 633hi def link kconfigDelimiter Delimiter 634hi def link kconfigConfOptIfExprGroup kconfigDelimiter 635hi def link kconfigConfOptIfGExpCSym kconfigConstantSymbol 636hi def link kconfigConfOptIfGExpNCSym kconfigSymbol 637hi def link kconfigConfOptIfGExpEq kconfigOperator 638hi def link kconfigConfOptIfGExpNEq kconfigOperator 639hi def link kconfigConfOptIfGExpCSym2 kconfigConstantSymbol 640hi def link kconfigConfOptIfGExpNCSym2 kconfigSymbol 641hi def link kconfigConfOptIfGExpNeg kconfigOperator 642hi def link kconfigConfOptIfGExpAnd kconfigOperator 643hi def link kconfigConfOptIfGExpOr kconfigOperator 644hi def link kconfigConfOptIfExprGrpE kconfigDelimiter 645hi def link kconfigConfOptExprCSym kconfigConstantSymbol 646hi def link kconfigConfOptExprNCSym kconfigSymbol 647hi def link kconfigConfOptExprEq kconfigOperator 648hi def link kconfigConfOptExprNEq kconfigOperator 649hi def link kconfigConfOptExprCSym2 kconfigConstantSymbol 650hi def link kconfigConfOptExprNCSym2 kconfigSymbol 651hi def link kconfigConfOptExprNeg kconfigOperator 652hi def link kconfigConfOptExprAnd kconfigOperator 653hi def link kconfigConfOptExprOr kconfigOperator 654hi def link kconfigConfOptExprGroup kconfigDelimiter 655hi def link kconfigConfOptGExpCSym kconfigConstantSymbol 656hi def link kconfigConfOptGExpNCSym kconfigSymbol 657hi def link kconfigConfOptGExpEq kconfigOperator 658hi def link kconfigConfOptGExpNEq kconfigOperator 659hi def link kconfigConfOptGExpCSym2 kconfigConstantSymbol 660hi def link kconfigConfOptGExpNCSym2 kconfigSymbol 661hi def link kconfigConfOptGExpNeg kconfigOperator 662hi def link kconfigConfOptGExpAnd kconfigOperator 663hi def link kconfigConfOptGExpOr kconfigOperator 664hi def link kconfigConfOptExprGrpE kconfigConfOptIfExprGroup 665 666else 667 668syn keyword kconfigTodo contained TODO FIXME XXX NOTE 669 670syn match kconfigComment display '#. * $ 'contains = kconfigTodo 671 672syn keyword kconfigKeyword config menuconfig comment mainmenu 673 674syn keyword kconfigConditional menu endmenu choice endchoice if endif 675 676syn keyword kconfigPreProc source 677 \nextgroup = kconfigPath 678 \skipwhite 679 680syn keyword kconfigTriState y m n 681 682syn match kconfigSpecialChar contained '\\. ' 683syn match kconfigSpecialChar '\\$ ' 684 685syn region kconfigPath matchgroup = kconfigPath 686 \start = +" +skip = +\\\\\|\\\" +end = +" + 687 \contains = kconfigSpecialChar 688 689syn region kconfigPath matchgroup = kconfigPath 690 \start = +' +skip = +\\\\\|\\\' +end = +' + 691 \contains = kconfigSpecialChar 692 693syn match kconfigPath '\S\+ ' 694 \contained 695 696syn region kconfigString matchgroup = kconfigString 697 \start = +" +skip = +\\\\\|\\\" +end = +" + 698 \contains = kconfigSpecialChar 699 700syn region kconfigString matchgroup = kconfigString 701 \start = +' +skip = +\\\\\|\\\' +end = +' + 702 \contains = kconfigSpecialChar 703 704syn keyword kconfigType bool boolean tristate string hex int 705 706syn keyword kconfigOption prompt default requires select range 707 \optional 708syn match kconfigOption 'depends\%( on\)\= ' 709 710syn keyword kconfigMacro def_bool def_tristate 711 712syn region kconfigHelpText 713 \matchgroup = kconfigOption 714 \start = '\%(help\|---help---\)\ze\s * \n\z(\s\+\) ' 715 \skip = '^$ ' 716 \end = '^\z1\@! ' 717 718hi def link kconfigTodo Todo 719hi def link kconfigComment Comment 720hi def link kconfigKeyword Keyword 721hi def link kconfigConditional Conditional 722hi def link kconfigPreProc PreProc 723hi def link kconfigTriState Boolean 724hi def link kconfigSpecialChar SpecialChar 725hi def link kconfigPath String 726hi def link kconfigString String 727hi def link kconfigType Type 728hi def link kconfigOption Identifier 729hi def link kconfigHelpText Normal 730hi def link kconfigmacro Macro 731 732endif 733 734let b: current_syntax = "kconfig" 735 736let & cpo = s: cpo_save 737unlet s: cpo_save