mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-21 12:50:09 -04:00
java locals.scm - fix class definition and scope
This commit is contained in:
parent
329128c47d
commit
7704e51277
1 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
; CREDITS @maxbrunsfeld (maxbrunsfeld@gmail.com)
|
||||
|
||||
;(class_declaration
|
||||
; name: (identifier) @name) @class
|
||||
; name: (identifier) @name) @definticlass
|
||||
;
|
||||
;(method_declaration
|
||||
; name: (identifier) @name) @method
|
||||
|
|
@ -10,7 +10,8 @@
|
|||
; name: (identifier) @name) @call
|
||||
|
||||
; SCOPES
|
||||
(class_declaration) @scope
|
||||
(class_declaration
|
||||
body: (_)) @scope
|
||||
(method_declaration) @scope
|
||||
(block) @scope
|
||||
; 3 captures for `if` - if+else, if only, else only
|
||||
|
|
@ -31,6 +32,6 @@
|
|||
|
||||
; DEFINITIONS
|
||||
(class_declaration
|
||||
name: (identifier) @definition.type)
|
||||
name: (identifier) @definition.class)
|
||||
(method_declaration
|
||||
name: (identifier) @definition.method)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue