Atom - Fluentd Config File syntax highlighting
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.

187 lines
4.4 KiB

  1. scopeName: 'source.fluentd'
  2. name: 'Fluentd Configuration'
  3. fileTypes: [
  4. 'fluent.conf'
  5. ]
  6. foldingStartMarker: '<[^>]+>\\s*$'
  7. foldingStopMarker: '^\\s*</[^>]+>'
  8. patterns: [
  9. {include: '#comments'}
  10. {include: '#directives'}
  11. ]
  12. repository:
  13. comments:
  14. patterns: [
  15. {
  16. match: '#.*'
  17. name: 'comment.line.number-sign.fluentd'
  18. }
  19. ]
  20. directives:
  21. patterns: [
  22. {
  23. match: '((@)include)\\s+([^\\s]+)'
  24. captures:
  25. '1':
  26. name: 'entity.directive.begin.fluentd'
  27. '2':
  28. name: 'punctuation.definition.directive.begin.fluentd'
  29. '3':
  30. name: 'entity.other.directive.attribute-name.fluentd'
  31. }
  32. {
  33. begin: '((<)[^\\s]+(\\s+[^>]+)?(>))'
  34. beginCaptures:
  35. '1':
  36. name: 'entity.directive.begin.fluentd'
  37. '2':
  38. name: 'punctuation.definition.directive.begin.fluentd'
  39. '3':
  40. name: 'entity.other.directive.attribute-name.fluentd'
  41. '4':
  42. name: 'punctuation.definition.directive.end.fluentd'
  43. end: '((</)\\w+(>))'
  44. endCaptures:
  45. '1':
  46. name: 'entity.directive.end.fluentd'
  47. '2':
  48. name: 'punctuation.definition.directive.begin.fluentd'
  49. '3':
  50. name: 'punctuation.definition.directive.end.fluentd'
  51. name: 'meta.directive.fluentd'
  52. patterns: [
  53. {include: '#comments'}
  54. {include: '#directives'}
  55. {include: '#parameters'}
  56. ]
  57. }
  58. ]
  59. parameters:
  60. patterns: [
  61. {
  62. begin: '(@[^\\s]+)|([^\\s]+)'
  63. beginCaptures:
  64. '1':
  65. name: 'keyword.parameter.system.fluentd'
  66. '2':
  67. name: 'keyword.parameter.fluentd'
  68. end: '\\n'
  69. name: 'meta.parameter.fluentd'
  70. patterns: [
  71. {include: '#comments'}
  72. {include: '#values'}
  73. ]
  74. }
  75. ]
  76. values:
  77. patterns: [
  78. {
  79. match: '\\\\.'
  80. name: 'value.string.escape.fluentd'
  81. }
  82. {
  83. begin: '(")'
  84. beginCaptures:
  85. '1':
  86. name: 'punctuation.definition.string.begin.fluentd'
  87. end: '(")'
  88. endCaptures:
  89. '1':
  90. name: 'punctuation.definition.string.end.fluentd'
  91. name: 'meta.value.string.quoted.double.fluentd'
  92. patterns: [
  93. {include: '#stringescapes'}
  94. {include: '#stringinterpolations'}
  95. ]
  96. }
  97. {
  98. begin: "(')"
  99. beginCaptures:
  100. '1':
  101. name: 'punctuation.definition.string.begin.fluentd'
  102. end: "(')"
  103. endCaptures:
  104. '1':
  105. name: 'punctuation.definition.string.end.fluentd'
  106. name: 'meta.value.string.quoted.single.fluentd'
  107. patterns: [
  108. {include: '#stringescapes'}
  109. ]
  110. }
  111. {
  112. begin: '(\\[)'
  113. beginCaptures:
  114. '1':
  115. name: 'punctuation.definition.array.begin.fluentd'
  116. end: '(\\])'
  117. endCaptures:
  118. '1':
  119. name: 'punctuation.definition.array.end.fluentd'
  120. name: 'meta.value.array.fluentd'
  121. patterns: [
  122. {include: 'source.json'}
  123. ]
  124. }
  125. {
  126. begin: '\\{'
  127. beginCaptures:
  128. '1':
  129. name: 'punctuation.definition.hash.begin.fluentd'
  130. end: '\\}'
  131. endCaptures:
  132. '1':
  133. name: 'punctuation.definition.hash.end.fluentd'
  134. name: 'meta.value.hash.fluentd'
  135. patterns: [
  136. {include: 'source.json'}
  137. ]
  138. }
  139. {
  140. match: '\/.+\/$'
  141. name: 'value.string.regex.fluentd'
  142. }
  143. {
  144. match: '\\b(\\d+)\\b'
  145. name: 'value.constant.integer.fluentd'
  146. }
  147. {
  148. match: '\\b(\\d+[kmgtKMGT])\\b'
  149. name: 'value.constant.size.fluentd'
  150. }
  151. {
  152. match: '\\b(\\d+[smhd])\\b'
  153. name: 'value.constant.time.fluentd'
  154. }
  155. {
  156. match: '(\\$\\{[^\\}]*\\})'
  157. name: 'variable.string.fluentd'
  158. }
  159. {
  160. match: '([^\\s]+?)'
  161. name: 'meta.string.unquoted.fluentd'
  162. captures:
  163. '1':
  164. name: 'string.unquoted.fluentd'
  165. }
  166. ]
  167. stringescapes:
  168. patterns: [
  169. {
  170. match: '\\\\.'
  171. name: 'constant.string.escape.fluentd'
  172. }
  173. ]
  174. stringinterpolations:
  175. patterns: [
  176. {
  177. begin: '#\\{'
  178. end: '\\}'
  179. name: 'constant.string.interpolation.fluentd'
  180. patterns: [
  181. {include: 'source.ruby'}
  182. ]
  183. }
  184. ]