forked from SublimeText/Terraform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTerraform Plan.sublime-syntax
More file actions
106 lines (92 loc) · 2.8 KB
/
Terraform Plan.sublime-syntax
File metadata and controls
106 lines (92 loc) · 2.8 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
%YAML 1.2
---
# http://www.sublimetext.com/docs/syntax.html
# https://github.com/hashicorp/terraform/blob/337bf8e11b75dff87509455cabee60b023dd586e/internal/command/jsonformat/plan.go#L201
name: Terraform Plan
scope: source.diff.terraform
version: 2
file_extensions:
- tfplan
- tf.plan
contexts:
main:
- include: comments
- include: diffs
- include: summary
comments:
- match: '#'
scope: punctuation.definition.comment.terraform
push:
- meta_scope: comment.line.number-sign.terraform
- include: pop-eol
diffs:
- match: ^\+/-
scope: punctuation.definition.changed.diff
push: line-created-then-destroyed
- match: ^-/\+
scope: punctuation.definition.changed.diff
push: line-destroyed-then-created
- match: ^!
scope: punctuation.definition.changed.diff
push: line-changed
- match: ^\+
scope: punctuation.definition.inserted.diff
push: line-inserted
- match: ^-
scope: punctuation.definition.deleted.diff
push: line-deleted
annotations:
- match: ->
scope: keyword.operator.assignment.terraform
- match: \(known after apply\)$
scope: comment.block.terraform
- match: \bnull$
scope: constant.language.null.terraform
line-deleted:
- meta_scope: markup.deleted.diff
- include: pop-eol
- include: annotations
line-inserted:
- meta_scope: markup.inserted.diff
- include: pop-eol
- include: annotations
line-changed:
- meta_scope: markup.changed.updated-in-place.diff
- include: pop-eol
- include: annotations
line-created-then-destroyed:
- meta_scope: markup.changed.created-then-destroyed.diff
- include: pop-eol
- include: annotations
line-destroyed-then-created:
- meta_scope: markup.changed.destroyed-then-created.diff
- include: pop-eol
- include: annotations
line-ignored:
- meta_scope: comment.line.diff
- include: pop-eol
- include: annotations
summary:
- match: ^(?=Plan:[ ]\d)
push:
- meta_scope: meta.block.summary.terraform
- include: pop-eol
- match: ','
scope: punctuation.separator.sequence.terraform
- match: \.
scope: punctuation.terminator.terraform
- match: (\d+) to add
scope: markup.inserted.terraform
captures:
1: meta.number.integer.decimal.terraform constant.numeric.value.terraform
- match: (\d+) to change
scope: markup.changed.terraform
captures:
1: meta.number.integer.decimal.terraform constant.numeric.value.terraform
- match: (\d+) to destroy
scope: markup.deleted.terraform
captures:
1: meta.number.integer.decimal.terraform constant.numeric.value.terraform
pop-eol:
- match: \n|$
pop: 1