You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
5.5 KiB

  1. {
  2. "name": "ElasticSearch",
  3. "scopeName": "source.es",
  4. "patterns": [
  5. {
  6. "match": "(?i)^\\s*\\b(GET|post|header|put|delete)\\b",
  7. "name": "keyword.es"
  8. },
  9. {
  10. "include": "#value"
  11. }
  12. ],
  13. "repository": {
  14. "array": {
  15. "begin": "\\[",
  16. "beginCaptures": {
  17. "0": {
  18. "name": "punctuation.definition.array.begin.json"
  19. }
  20. },
  21. "end": "\\]",
  22. "endCaptures": {
  23. "0": {
  24. "name": "punctuation.definition.array.end.json"
  25. }
  26. },
  27. "name": "meta.structure.array.json",
  28. "patterns": [
  29. {
  30. "include": "#value"
  31. },
  32. {
  33. "match": ",",
  34. "name": "punctuation.separator.array.json"
  35. },
  36. {
  37. "match": "[^\\s\\]]",
  38. "name": "invalid.illegal.expected-array-separator.json"
  39. }
  40. ]
  41. },
  42. "comments": {
  43. "patterns": [
  44. {
  45. "begin": "/\\*\\*(?!/)",
  46. "captures": {
  47. "0": {
  48. "name": "punctuation.definition.comment.json"
  49. }
  50. },
  51. "end": "\\*/",
  52. "name": "comment.block.documentation.json"
  53. },
  54. {
  55. "begin": "/\\*",
  56. "captures": {
  57. "0": {
  58. "name": "punctuation.definition.comment.json"
  59. }
  60. },
  61. "end": "\\*/",
  62. "name": "comment.block.json"
  63. },
  64. {
  65. "captures": {
  66. "1": {
  67. "name": "punctuation.definition.comment.json"
  68. }
  69. },
  70. "match": "(//).*$\\n?",
  71. "name": "comment.line.double-slash.js"
  72. }
  73. ]
  74. },
  75. "constant": {
  76. "match": "\\b(?:true|false|null)\\b",
  77. "name": "constant.language.json"
  78. },
  79. "number": {
  80. "match": "(?x) # turn on extended mode\r\n -? # an optional minus\r\n (?:\r\n 0 # a zero\r\n | # ...or...\r\n [1-9] # a 1-9 character\r\n \\d* # followed by zero or more digits\r\n )\r\n (?:\r\n (?:\r\n \\. # a period\r\n \\d+ # followed by one or more digits\r\n )?\r\n (?:\r\n [eE] # an e character\r\n [+-]? # followed by an option +/-\r\n \\d+ # followed by one or more digits\r\n )? # make exponent optional\r\n )? # make decimal portion optional",
  81. "name": "constant.numeric.json"
  82. },
  83. "object": {
  84. "begin": "\\{",
  85. "beginCaptures": {
  86. "0": {
  87. "name": "punctuation.definition.dictionary.begin.json"
  88. }
  89. },
  90. "end": "\\}",
  91. "endCaptures": {
  92. "0": {
  93. "name": "punctuation.definition.dictionary.end.json"
  94. }
  95. },
  96. "name": "meta.structure.dictionary.json",
  97. "patterns": [
  98. {
  99. "comment": "the JSON object key",
  100. "include": "#objectkey"
  101. },
  102. {
  103. "include": "#comments"
  104. },
  105. {
  106. "begin": ":",
  107. "beginCaptures": {
  108. "0": {
  109. "name": "punctuation.separator.dictionary.key-value.json"
  110. }
  111. },
  112. "end": "(,)|(?=\\})",
  113. "endCaptures": {
  114. "1": {
  115. "name": "punctuation.separator.dictionary.pair.json"
  116. }
  117. },
  118. "name": "meta.structure.dictionary.value.json",
  119. "patterns": [
  120. {
  121. "comment": "the JSON object value",
  122. "include": "#value"
  123. },
  124. {
  125. "match": "[^\\s,]",
  126. "name": "invalid.illegal.expected-dictionary-separator.json"
  127. }
  128. ]
  129. },
  130. {
  131. "match": "[^\\s\\}]",
  132. "name": "invalid.illegal.expected-dictionary-separator.json"
  133. }
  134. ]
  135. },
  136. "string": {
  137. "begin": "\"",
  138. "beginCaptures": {
  139. "0": {
  140. "name": "punctuation.definition.string.begin.json"
  141. }
  142. },
  143. "end": "\"",
  144. "endCaptures": {
  145. "0": {
  146. "name": "punctuation.definition.string.end.json"
  147. }
  148. },
  149. "name": "string.quoted.double.json",
  150. "patterns": [
  151. {
  152. "include": "#stringcontent"
  153. }
  154. ]
  155. },
  156. "objectkey": {
  157. "begin": "\"",
  158. "beginCaptures": {
  159. "0": {
  160. "name": "punctuation.support.type.property-name.begin.json"
  161. }
  162. },
  163. "end": "\"",
  164. "endCaptures": {
  165. "0": {
  166. "name": "punctuation.support.type.property-name.end.json"
  167. }
  168. },
  169. "name": "string.json support.type.property-name.json",
  170. "patterns": [
  171. {
  172. "include": "#stringcontent"
  173. }
  174. ]
  175. },
  176. "stringcontent": {
  177. "patterns": [
  178. {
  179. "match": "(?x) # turn on extended mode\r\n \\\\ # a literal backslash\r\n (?: # ...followed by...\r\n [\"\\\\/bfnrt] # one of these characters\r\n | # ...or...\r\n u # a u\r\n [0-9a-fA-F]{4}) # and four hex digits",
  180. "name": "constant.character.escape.json"
  181. },
  182. {
  183. "match": "\\\\.",
  184. "name": "invalid.illegal.unrecognized-string-escape.json"
  185. }
  186. ]
  187. },
  188. "value": {
  189. "patterns": [
  190. {
  191. "include": "#constant"
  192. },
  193. {
  194. "include": "#number"
  195. },
  196. {
  197. "include": "#string"
  198. },
  199. {
  200. "include": "#array"
  201. },
  202. {
  203. "include": "#object"
  204. },
  205. {
  206. "include": "#comments"
  207. }
  208. ]
  209. }
  210. }
  211. }