on master help sign in
Update tree-sitter-zig (#7803)
commitbc737404e8ad462b4101987730f4a76658d132ad authorvoroskoi <60064214+voroskoi@users.noreply.github.com> dateWed 2 Aug 2023, 21:22 (3 years ago) parent325692a
3 files changed+9−6
languages.toml+1−1 runtime/queries/zig/highlights.scm+5−2 runtime/queries/zig/textobjects.scm+3−3
languages.toml+1−1
@@ -1039,7 +1039,7 @@ args = { console = "internalConsole", attachCommands = [ "platform select remote
10391039
10401040[[grammar]]
10411041name = "zig"
1042−source = { git = "https://github.com/maxxnino/tree-sitter-zig", rev = "8d3224c3bd0890fe08358886ebf54fca2ed448a6" }
1042+source = { git = "https://github.com/maxxnino/tree-sitter-zig", rev = "0d08703e4c3f426ec61695d7617415fff97029bd" }
10431043
10441044[[language]]
10451045name = "prolog"
runtime/queries/zig/highlights.scm+5−2
@@ -14,7 +14,7 @@
1414 field_access: (IDENTIFIER)
1515 parameter: (IDENTIFIER)
1616 ] @type
17− (#match? @type "^[A-Z]([a-z]+[A-Za-z0-9]*)*$")
17+ (#match? @type "^[A-Z]([a-z]+[A-Za-z0-9]*)+$")
1818)
1919
2020;; assume camelCase is a function
@@ -122,8 +122,11 @@ field_constant: (IDENTIFIER) @constant
122122] @keyword.operator
123123
124124[
125− "struct"
126125 "enum"
126+] @type.enum
127+
128+[
129+ "struct"
127130 "union"
128131 "packed"
129132 "opaque"
runtime/queries/zig/textobjects.scm+3−3
@@ -1,4 +1,4 @@
1−(TopLevelDecl (FnProto)
1+(Decl (FnProto)
22 (_) @function.inside) @function.around
33
44(TestDecl (_) @test.inside) @test.around
@@ -6,10 +6,10 @@
66; matches all of: struct, enum, union
77; this unfortunately cannot be split up because
88; of the way struct "container" types are defined
9−(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl
9+(Decl (VarDecl (ErrorUnionExpr (SuffixExpr (ContainerDecl
1010 (_) @class.inside))))) @class.around
1111
12−(TopLevelDecl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl
12+(Decl (VarDecl (ErrorUnionExpr (SuffixExpr (ErrorSetDecl
1313 (_) @class.inside))))) @class.around
1414
1515(ParamDeclList