mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-23 05:40:11 -04:00
java locals.scm - fix definitions
This commit is contained in:
parent
c8d871fc14
commit
f0d0fbfbb2
1 changed files with 8 additions and 4 deletions
|
|
@ -4,7 +4,7 @@
|
||||||
(method_declaration) @scope
|
(method_declaration) @scope
|
||||||
(block) @scope
|
(block) @scope
|
||||||
; 3 captures for `if` - if+else, if only, else only
|
; 3 captures for `if` - if+else, if only, else only
|
||||||
(if_statement) @scope
|
(if_statement) @scope
|
||||||
(if_statement
|
(if_statement
|
||||||
body: (_)) @scope
|
body: (_)) @scope
|
||||||
(if_statement
|
(if_statement
|
||||||
|
|
@ -24,10 +24,14 @@
|
||||||
name: (identifier) @definition.class)
|
name: (identifier) @definition.class)
|
||||||
(method_declaration
|
(method_declaration
|
||||||
name: (identifier) @definition.method)
|
name: (identifier) @definition.method)
|
||||||
(local_variable_declaration) @definition.var
|
(local_variable_declaration
|
||||||
(field_declaration) @definition.field
|
declarator: (variable_declarator
|
||||||
|
name: (identifier) @definition.var))
|
||||||
|
(field_declaration
|
||||||
|
declarator: (variable_declarator
|
||||||
|
name: (identifier) @definition.field))
|
||||||
(import_declaration) @definition.import
|
(import_declaration) @definition.import
|
||||||
|
|
||||||
;; REFERENCE
|
; REFERENCES
|
||||||
(identifier) @reference
|
(identifier) @reference
|
||||||
(type_identifier) @reference
|
(type_identifier) @reference
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue