-
Notifications
You must be signed in to change notification settings - Fork 375
Expand file tree
/
Copy pathLaTeXTools Build Output.sublime-syntax
More file actions
110 lines (102 loc) · 3.59 KB
/
LaTeXTools Build Output.sublime-syntax
File metadata and controls
110 lines (102 loc) · 3.59 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
%YAML 1.2
---
# https://www.sublimetext.com/docs/syntax.html
name: LaTeXTools Build Output
scope: text.build-output.latextools
version: 2
hidden: true
variables:
build_results: ^\[(?:(?:Build (?:cancelled by user|failed|skipped))!|Finished\b.+)\]$
log_file: ^((.+?)(?:(:)(\d+))?)(:)[ ](Double-click here to open the full log\.)$
contexts:
main:
- meta_include_prototype: false
- match: ^\[Compiling '(.+)' with '(.+)'\]
scope: meta.heading.job.build.latextools
captures:
1: entity.name.texfile.latextools
2: entity.name.builder.latextools
set: build-messages
build-messages:
- meta_content_scope: meta.messages.build.latextools
# command results
- match: (\.\.\.)\s*(aborted|error)$
captures:
1: punctuation.separator.build.latextools
2: message.error.build.latextools
- match: (\.\.\.)\s*(cancelled)$
captures:
1: punctuation.separator.build.latextools
2: message.warning.build.latextools
- match: (\.\.\.)\s*(done)$
captures:
1: punctuation.separator.build.latextools
2: message.info.build.latextools
- match: \.\.\.$
scope: punctuation.separator.build.latextools
# build log summary
- include: build-log
build-log:
- meta_content_scope: meta.logfile.build.latextools
# errors and warning
- match: \bBad Boxes(:)$
scope:
meta.logfile.build.latextools
message.error.build.latextools
markup.heading.build.latextools
captures:
1: punctuation.separator.build.latextools
set: build-log-badboxes
- match: \bErrors(:)$
scope:
meta.logfile.build.latextools
message.error.build.latextools
markup.heading.build.latextools
captures:
1: punctuation.separator.build.latextools
set: build-log-errors
- match: \bWarnings(:)$
scope:
meta.logfile.build.latextools
message.warning.build.latextools
markup.heading.build.latextools
captures:
1: punctuation.separator.build.latextools
set: build-log-warnings
# info
- match: \bNo (?:errors|warnings|bad boxes)\.
scope:
meta.logfile.build.latextools
message.info.build.latextools
markup.heading.build.latextools
set: build-log
# hint to open full log file
- match: '{{log_file}}'
scope: meta.logfile.build.latextools
captures:
1: meta.path.logfile.build.latextools
2: entity.name.logfile.build.latextools
3: punctuation.separator.build.latextools
4: constant.numeric.line.build.latextools
5: punctuation.separator.build.latextools
6: meta.info.open-logfile.build.latextools
set: build-log
# build result summary
- match: (?={{build_results}})
set: build-result
build-log-badboxes:
- meta_content_scope: meta.logfile.build.latextools message.error.badbox.build.latextools
- include: build-log
build-log-errors:
- meta_content_scope: meta.logfile.build.latextools message.error.other.build.latextools
- include: build-log
build-log-warnings:
- meta_content_scope: meta.logfile.build.latextools message.warning.other.build.latextools
- include: build-log
build-result:
- match: ^\[Build failed!\]$\n?
scope: meta.summary.failure.build.latextools message.error.build.latextools
- match: ^\[Build cancelled by user!\]$\n?
scope: meta.summary.failure.build.latextools message.warning.build.latextools
- match: ^\[(?:Build skipped!|Finished\b.+)\]$\n?
scope: meta.summary.success.build.latextools message.info.build.latextools