mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-13 08:50:11 -04:00
Added Zig grammar
This commit is contained in:
parent
74234bc0e0
commit
597ec69378
7 changed files with 266 additions and 0 deletions
25
queries/zig/locals.scm
Normal file
25
queries/zig/locals.scm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
(function_declaration
|
||||
name: (identifier) @definition.function
|
||||
)
|
||||
|
||||
((type_identifier) @reference
|
||||
(set! reference.kind "type"))
|
||||
|
||||
(assignment_statement
|
||||
name: (identifier) @definition.var
|
||||
)
|
||||
|
||||
(identifier) @reference
|
||||
|
||||
; Scopes
|
||||
[
|
||||
(block)
|
||||
(comptime_block)
|
||||
(defer_block)
|
||||
(suspend_block)
|
||||
(resume_block)
|
||||
(if_expression)
|
||||
(while_expression)
|
||||
(for_expression)
|
||||
(test_expression)
|
||||
] @scope
|
||||
Loading…
Add table
Add a link
Reference in a new issue