-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathOrderTable.sublime-syntax
More file actions
92 lines (78 loc) · 2.3 KB
/
OrderTable.sublime-syntax
File metadata and controls
92 lines (78 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
%YAML 1.2
---
name: Order Table
scope: text.order-table
hidden: true
contexts:
main:
# Header
- match: '^═.*═$'
scope: markup.heading.order-table
# Pending section header
- match: '^PENDING\s+\((\d+)\)'
captures:
1: constant.numeric.order-table
scope: entity.name.section.order-table
# Done section (comment style)
- match: '^#.*$'
scope: comment.line.order-table
# Separator lines
- match: '^─+$'
scope: comment.line.order-table
# Order ID - pending
- match: '\[(order_\d+)\]'
captures:
1: entity.name.tag.order-table
# File location
- match: '@\s+([^:]+):(\d+)'
captures:
1: string.unquoted.order-table
2: constant.numeric.line.order-table
# Done by
- match: '\bby\s+(\S+)'
captures:
1: variable.parameter.order-table
# Hotkey hints
- match: '^(Cmd\+\S+|Enter|g|double-click)'
scope: keyword.operator.order-table
# No pending message
- match: '^No pending orders$'
scope: comment.line.order-table
# Prompt text (indented lines)
- match: '^\s{4}(.+)$'
captures:
1: string.quoted.order-table
# Edit entries header
- match: '^📝 RECENT EDITS.*(\[grouped\]|\[by time\])'
captures:
1: keyword.control.order-table
scope: entity.name.section.order-table
# Grouped view: file header line (no line number)
- match: '^\s{2}(\S[^:\[]+)\s+\[([^\]]+)\]\s*$'
captures:
1: entity.name.filename.order-table
2: variable.parameter.order-table
# Edit entry line (both grouped indent and flat): file:line delta ago context [agent]?
- match: '^\s+(.+?):(\d+)\s+'
captures:
1: string.unquoted.order-table
2: constant.numeric.line.order-table
push: edit_entry_rest
edit_entry_rest:
# Delta (+N/-M)
- match: '(\+\d+)(/\-\d+)?'
captures:
1: markup.inserted.order-table
2: markup.deleted.order-table
# Time ago
- match: '\b(\d+[mhd]\s+ago|just\s+now)\b'
scope: comment.line.order-table
# Agent ID at end (flat view only)
- match: '\[(\d+)\]'
captures:
1: variable.parameter.order-table
# Context words
- match: '\S+'
scope: keyword.other.order-table
- match: '$'
pop: true