Newer
Older
moodlog_sublime / moodlog.sublime-syntax
0xRoM on 4 Jan 2024 1 KB now supporting hashtags
  1. %YAML 1.2
  2. ---
  3. # http://www.sublimetext.com/docs/3/syntax.html
  4. name: moodlogtxt
  5. file_extensions:
  6. - moodlog.txt
  7. scope: text.moodlogtxt
  8. variables:
  9. date: ([1-2]\d{3}[-/\\.](0?[1-9]|1[012])[-/\\.](0[1-9]|[12]\d|3[01]))
  10. time: (?:\s([0-9]|0[0-9]|1[0-9]|2[0-3])\:[0-5][0-9])
  11. yellow: hsl(54, 100%, 50%)
  12. contexts:
  13. main:
  14. - include: hashtags
  15.  
  16. - match: '{{time}}{1,2}'
  17. comment: moodlog time
  18. scope: constant.numeric.moodlogtxt.time
  19.  
  20. - match: (^\[\S+)|(\s\[\S+)
  21. comment: Todo item project
  22. scope: string.unquoted.scheduler.config
  23.  
  24. - match: (^\@\S+)|(\s\@\S+)
  25. comment: context
  26. scope: comment.block.moodlogtxt.context
  27.  
  28. - match: (^\#\S+)|(\s\#\S+)
  29. comment: hashtag
  30. scope: variable.function
  31.  
  32. - match: (^\+\S+)|(\s\+\S+)
  33. comment: positive
  34. scope: entity.name.class.moodlogtxt.project
  35.  
  36. - match: (^\-\S+)|(\s\-\S+)
  37. comment: negative
  38. scope: entity.name.tag.moodlogtxt.context
  39.  
  40. - match: '{{date}}(?= ){1,2}'
  41. comment: Todo item done or creation date
  42. scope: constant.numeric.moodlogtxt.date
  43.  
  44. - match: '(?:[^x])((?!\s([@\+\-\#])|({{date}})).)+'
  45. comment: Todo item text
  46. scope: entity.task.moodlogtxt
Buy Me A Coffee