nginx.json 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. {
  2. "aliases": [
  3. "nginxconf"
  4. ],
  5. "contains": [
  6. {
  7. "className": "comment",
  8. "begin": "#",
  9. "end": "$",
  10. "contains": [
  11. {
  12. "begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
  13. },
  14. {
  15. "className": "doctag",
  16. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  17. "relevance": 0
  18. }
  19. ]
  20. },
  21. {
  22. "begin": "[a-zA-Z_]\\w*\\s+{",
  23. "returnBegin": true,
  24. "end": "{",
  25. "contains": [
  26. {
  27. "className": "section",
  28. "begin": "[a-zA-Z_]\\w*"
  29. }
  30. ],
  31. "relevance": 0
  32. },
  33. {
  34. "begin": "[a-zA-Z_]\\w*\\s",
  35. "end": ";|{",
  36. "returnBegin": true,
  37. "contains": [
  38. {
  39. "className": "attribute",
  40. "begin": "[a-zA-Z_]\\w*",
  41. "starts": {
  42. "endsWithParent": true,
  43. "lexemes": "[a-z\/_]+",
  44. "keywords": {
  45. "literal": "on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll \/dev\/poll"
  46. },
  47. "relevance": 0,
  48. "illegal": "=>",
  49. "contains": [
  50. {
  51. "$ref": "#contains.0"
  52. },
  53. {
  54. "className": "string",
  55. "contains": [
  56. {
  57. "begin": "\\\\[\\s\\S]",
  58. "relevance": 0
  59. },
  60. {
  61. "className": "variable",
  62. "variants": [
  63. {
  64. "begin": "\\$\\d+"
  65. },
  66. {
  67. "begin": "\\$\\{",
  68. "end": "}"
  69. },
  70. {
  71. "begin": "[\\$\\@][a-zA-Z_]\\w*"
  72. }
  73. ]
  74. }
  75. ],
  76. "variants": [
  77. {
  78. "begin": "\"",
  79. "end": "\""
  80. },
  81. {
  82. "begin": "'",
  83. "end": "'"
  84. }
  85. ]
  86. },
  87. {
  88. "begin": "([a-z]+):\/",
  89. "end": "\\s",
  90. "endsWithParent": true,
  91. "excludeEnd": true,
  92. "contains": [
  93. {
  94. "$ref": "#contains.2.contains.0.starts.contains.1.contains.1"
  95. }
  96. ]
  97. },
  98. {
  99. "className": "regexp",
  100. "contains": [
  101. {
  102. "$ref": "#contains.2.contains.0.starts.contains.1.contains.0"
  103. },
  104. {
  105. "$ref": "#contains.2.contains.0.starts.contains.1.contains.1"
  106. }
  107. ],
  108. "variants": [
  109. {
  110. "begin": "\\s\\^",
  111. "end": "\\s|{|;",
  112. "returnEnd": true
  113. },
  114. {
  115. "begin": "~\\*?\\s+",
  116. "end": "\\s|{|;",
  117. "returnEnd": true
  118. },
  119. {
  120. "begin": "\\*(\\.[a-z\\-]+)+"
  121. },
  122. {
  123. "begin": "([a-z\\-]+\\.)+\\*"
  124. }
  125. ]
  126. },
  127. {
  128. "className": "number",
  129. "begin": "\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"
  130. },
  131. {
  132. "className": "number",
  133. "begin": "\\b\\d+[kKmMgGdshdwy]*\\b",
  134. "relevance": 0
  135. },
  136. {
  137. "$ref": "#contains.2.contains.0.starts.contains.1.contains.1"
  138. }
  139. ]
  140. }
  141. }
  142. ],
  143. "relevance": 0
  144. }
  145. ],
  146. "illegal": "[^\\s\\}]"
  147. }