mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-20 12:20:02 -04:00
feat(streamdevice_proto): add parser and queries
This commit is contained in:
parent
6e42d823ce
commit
5d9526e9b0
6 changed files with 149 additions and 0 deletions
22
runtime/queries/streamdevice_proto/locals.scm
Normal file
22
runtime/queries/streamdevice_proto/locals.scm
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
(source_file) @local.scope
|
||||
|
||||
; The content of a function is a scope, not the whole function block.
|
||||
; Else, the function is defined inside itself
|
||||
(function
|
||||
.
|
||||
(function_name)
|
||||
.
|
||||
(_) @local.scope)
|
||||
|
||||
(function
|
||||
.
|
||||
(function_name) @local.definition.function)
|
||||
|
||||
(assignment
|
||||
(variable_name) @local.definition.var)
|
||||
|
||||
(variable_name) @local.reference
|
||||
|
||||
((handler
|
||||
(function_name) @local.reference)
|
||||
(#set! reference.kind "call"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue