-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathKong.sublime-syntax
More file actions
37 lines (31 loc) · 884 Bytes
/
Kong.sublime-syntax
File metadata and controls
37 lines (31 loc) · 884 Bytes
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
%YAML 1.2
---
# See http://www.sublimetext.com/docs/syntax.html
scope: source.yaml.kong
version: 2
extends: Packages/YAML/YAML.sublime-syntax
file_extensions:
- kong.yml
- kong.yaml
contexts:
main:
- meta_prepend: true
- match: \b(paths)\s*(:)(?=\s|$)
captures:
1: string.unquoted.plain.out.yaml keyword.control.flow.paths.kong
2: punctuation.separator.key-value.yaml
push: paths-block
paths-block:
- meta_scope: meta.block.paths.kong
- include: comment
- include: paths-block-sequence
- match: ^
pop: 1
paths-block-sequence:
# http://www.yaml.org/spec/1.2/spec.html#style/block/sequence
# l+block-sequence(n)
- match: \s*(-)(?!\S)
scope: punctuation.definition.block.sequence.item.yaml
push: expect-regexp
expect-regexp:
- include: scope:source.yaml.sublime.syntax#expect_regexp