on master help sign in
update Gleam grammar and queries
45dd540Michael Davis
languages.toml+1−1
@@ -1127,7 +1127,7 @@ indent = { tab-width = 2, unit = " " }
1127
1127
1128[[grammar]]
1128[[grammar]]
1129name = "gleam"
1129name = "gleam"
1130−source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "7159ce961592192b0e7cdf88782cda0fdf41a4cb" }
1130+source = { git = "https://github.com/gleam-lang/tree-sitter-gleam", rev = "d7861b2a4b4d594c58bb4f1be5f1f4ee4c67e5c3" }
1131
1131
1132[[language]]
1132[[language]]
1133name = "ron"
1133name = "ron"
runtime/queries/gleam/highlights.scm+5
@@ -12,6 +12,8 @@
12(import alias: (identifier) @namespace)
12(import alias: (identifier) @namespace)
13(remote_type_identifier
13(remote_type_identifier
14 module: (identifier) @namespace)
14 module: (identifier) @namespace)
15+(remote_constructor_name
16+ module: (identifier) @namespace)
15((field_access
17((field_access
16 record: (identifier) @namespace
18 record: (identifier) @namespace
17 field: (label) @function)
19 field: (label) @function)
@@ -45,6 +47,9 @@
45(remote_type_identifier) @type
47(remote_type_identifier) @type
46(type_identifier) @type
48(type_identifier) @type
47
49
50+; Data constructors
51+(constructor_name) @constructor
52+
48; Literals
53; Literals
49(string) @string
54(string) @string
50(bit_string_segment_option) @function.builtin
55(bit_string_segment_option) @function.builtin
runtime/queries/gleam/locals.scm+1−1
@@ -1,5 +1,5 @@
1; Scopes
1; Scopes
2−(function_body) @local.scope
2+(function) @local.scope
3
3
4(case_clause) @local.scope
4(case_clause) @local.scope
5
5