on master help sign in
YAML support (#667)
1586b0eoberblastmeister
.gitmodules+4
@@ -102,6 +102,10 @@
102 path = helix-syntax/languages/tree-sitter-protobuf
102 path = helix-syntax/languages/tree-sitter-protobuf
103 url = https://github.com/yusdacra/tree-sitter-protobuf.git
103 url = https://github.com/yusdacra/tree-sitter-protobuf.git
104 shallow = true
104 shallow = true
105+[submodule "helix-syntax/languages/tree-sitter-yaml"]
106+ path = helix-syntax/languages/tree-sitter-yaml
107+ url = https://github.com/ikatyang/tree-sitter-yaml
108+ shallow = true
105[submodule "helix-syntax/languages/tree-sitter-zig"]
109[submodule "helix-syntax/languages/tree-sitter-zig"]
106 path = helix-syntax/languages/tree-sitter-zig
110 path = helix-syntax/languages/tree-sitter-zig
107 url = https://github.com/maxxnino/tree-sitter-zig
111 url = https://github.com/maxxnino/tree-sitter-zig
helix-syntax/languages/tree-sitter-yamlnew file+1

Submodule changed.

languages.toml+8
@@ -224,6 +224,14 @@ roots = []
224comment-token = ";"
224comment-token = ";"
225indent = { tab-width = 4, unit = " " }
225indent = { tab-width = 4, unit = " " }
226
226
227+[[language]]
228+name = "yaml"
229+scope = "source.yaml"
230+file-types = ["yml", "yaml"]
231+roots = []
232+comment-token = "#"
233+indent = { tab-width = 2, unit = " " }
234+
227# [[language]]
235# [[language]]
228# name = "haskell"
236# name = "haskell"
229# scope = "source.haskell"
237# scope = "source.haskell"
runtime/queries/yaml/highlights.scmnew file+33
@@ -0,0 +1,33 @@
1+(block_mapping_pair key: (_) @property)
2+(flow_mapping (_ key: (_) @property))
3+(boolean_scalar) @boolean
4+(null_scalar) @constant.builtin
5+(double_quote_scalar) @string
6+(single_quote_scalar) @string
7+(escape_sequence) @string.escape
8+(integer_scalar) @number
9+(float_scalar) @number
10+(comment) @comment
11+(anchor_name) @type
12+(alias_name) @type
13+(tag) @type
14+(yaml_directive) @keyword
15+(ERROR) @error
16+
17+[
18+","
19+"-"
20+":"
21+">"
22+"?"
23+"|"
24+] @punctuation.delimiter
25+
26+[
27+"["
28+"]"
29+"{"
30+"}"
31+] @punctuation.bracket
32+
33+["*" "&"] @punctuation.special
runtime/queries/yaml/indents.tomlnew file+3
@@ -0,0 +1,3 @@
1+indent = [
2+ "block_mapping_pair",
3+]