mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-18 03:10:04 -04:00
feat!: drop modules, general refactor and cleanup
This commit is contained in:
parent
310f0925ec
commit
692b051b09
1247 changed files with 6096 additions and 9074 deletions
40
runtime/queries/enforce/locals.scm
Normal file
40
runtime/queries/enforce/locals.scm
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
; Scopes
|
||||
(compilation_unit) @local.scope
|
||||
|
||||
(decl_class
|
||||
body: (_) @local.scope)
|
||||
|
||||
(decl_enum
|
||||
body: (_) @local.scope)
|
||||
|
||||
(decl_method) @local.scope
|
||||
|
||||
(block) @local.scope
|
||||
|
||||
(if) @local.scope
|
||||
|
||||
(for) @local.scope
|
||||
|
||||
(foreach) @local.scope
|
||||
|
||||
(while) @local.scope
|
||||
|
||||
; Definitions
|
||||
(decl_class
|
||||
typename: (identifier) @local.definition.type)
|
||||
|
||||
(decl_enum
|
||||
typename: (identifier) @local.definition.enum)
|
||||
|
||||
(decl_method
|
||||
name: (identifier) @local.definition.method)
|
||||
|
||||
(decl_variable
|
||||
(_)*
|
||||
(identifier) @local.definition.var)
|
||||
|
||||
; References
|
||||
(identifier) @local.reference
|
||||
|
||||
(type_identifier
|
||||
(identifier) @local.reference)
|
||||
Loading…
Add table
Add a link
Reference in a new issue