A Sublime Text 3 package that adds a simple syntax highlighting, perfect for config files. mirror of https://github.com/budlabs/SimpleSyntax
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.

62 lines
1.5 KiB

  1. %YAML 1.2
  2. ---
  3. name: ssExcla
  4. fileTypes: []
  5. scope: source.ssExcla
  6. contexts:
  7. # The prototype context is prepended to all contexts but those setting
  8. # meta_include_prototype: false.
  9. prototype:
  10. - include: comments
  11. main:
  12. - include: numbers
  13. - include: strings
  14. # - include: budsym
  15. numbers:
  16. - match: '\b(-)?[0-9.]+\b'
  17. scope: constant.numeric.ssExcla
  18. strings:
  19. - match: '"'
  20. scope: punctuation.definition.string.begin.ssExcla
  21. push: inside_string
  22. inside_string:
  23. - meta_include_prototype: false
  24. - meta_scope: string.quoted.double.ssExcla
  25. - match: '\.'
  26. scope: constant.character.escape.ssExcla
  27. - match: '"'
  28. scope: punctuation.definition.string.end.ssExcla
  29. pop: true
  30. comments:
  31. # Comments begin with a '//' and finish at the end of the line.
  32. - match: '!'
  33. scope: punctuation.definition.comment.ssExcla
  34. push:
  35. - include: budsym
  36. - meta_scope: comment.line.double-slash.ssExcla
  37. - match: $\n?
  38. pop: true
  39. budsym-terminator:
  40. - match: '[ ]*(!*)[ ]*($\n?)'
  41. captures:
  42. 1: punctuation.definition.heading.end.markdown
  43. 2: meta.whitespace.newline.markdown
  44. pop: true
  45. budsym:
  46. - meta_include_prototype: false
  47. - match: ' >>'
  48. # - match: '(>{1,6})(?!>)\s*(?=\S)'
  49. captures:
  50. 1: punctuation.definition.heading.begin.markdown
  51. push:
  52. - meta_scope: markup.heading.markdown
  53. - meta_content_scope: entity.name.section.markdown
  54. - include: budsym-terminator