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