Skip to content

Commit 91ad808

Browse files
authored
[D, Makefile, Rust] Standardize build output scopes (sublimehq#4365)
* [D] Standardize build output scopes * [Makefile] Standardize build output scopes * [Rust] Standardize build output scopes * Change base scope to text.build-output * Tweak scope for result line
1 parent 8b02fe0 commit 91ad808

File tree

3 files changed

+37
-17
lines changed

3 files changed

+37
-17
lines changed

D/DMD Output.sublime-syntax

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,21 @@
22
---
33
name: DMD Output
44
hidden: true
5-
scope: source.build_output.dmd
5+
scope: text.build-output.dmd
66
contexts:
77
main:
88
- match: '^(.*?)\(([0-9]+)(?:,\s*([0-9]+))?\): '
99
captures:
10-
1: entity.name.filename.dmd
11-
2: constant.numeric.line-number.dmd
12-
3: constant.numeric.line-number.dmd
13-
- match: '\b(Warning|Error)(:) '
10+
1: entity.name.filename.build-output
11+
2: constant.numeric.line-number.build-output
12+
3: constant.numeric.column-number.build-output
13+
- match: '\b(Error)(:) '
1414
captures:
15-
1: message.error.dmd
16-
2: punctuation.separator.dmd
15+
1: message.error.build-output markup.error.build-output
16+
2: punctuation.separator.build-output
17+
- match: '\b(Warning)(:) '
18+
captures:
19+
1: message.warning.build-output markup.warning.build-output
20+
2: punctuation.separator.build-output
21+
- match: '^\[.+\]$'
22+
scope: comment.line.result.build-output

Makefile/Make Output.sublime-syntax

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,21 @@
22
---
33
name: Make Output
44
hidden: true
5-
scope: source.build_output
5+
scope: text.build-output.make
66
contexts:
77
main:
88
- match: '^(..[^:\n]*):([0-9]+):?([0-9]+)?:? '
9-
scope: entity.name.filename
10-
- match: '\b(warning|error): '
11-
scope: message.error
9+
captures:
10+
1: entity.name.filename.build-output
11+
2: constant.numeric.line-number.build-output
12+
3: constant.numeric.column-number.build-output
13+
- match: '\b(error)(:) '
14+
captures:
15+
1: message.error.build-output markup.error.build-output
16+
2: punctuation.separator.build-output
17+
- match: '\b(warning)(:) '
18+
captures:
19+
1: message.warning.build-output markup.warning.build-output
20+
2: punctuation.separator.build-output
1221
- match: '^\[.+\]$'
13-
scope: comment
22+
scope: comment.line.result.build-output

Rust/Cargo.sublime-syntax

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22
---
33
# http://www.sublimetext.com/docs/3/syntax.html
44
name: Cargo Build Results
5-
scope: source.build_results
5+
scope: text.build-output.cargo
66
hidden: true
77
contexts:
88
main:
99
- match: '^(..[^:\n]*):([0-9]+):?([0-9]+)?:? '
10-
scope: entity.name.filename
11-
- match: '\berror: '
12-
scope: message.error
10+
captures:
11+
1: entity.name.filename.build-output
12+
2: constant.numeric.line-number.build-output
13+
3: constant.numeric.column-number.build-output
14+
- match: '\b(error)(:) '
15+
captures:
16+
1: message.error.build-output markup.error.build-output
17+
2: punctuation.separator.build-output
1318
- match: '^\[.+\]$'
14-
scope: comment
19+
scope: comment.line.result.build-output

0 commit comments

Comments
 (0)