mirror of
https://github.com/stevearc/aerial.nvim
synced 2024-09-16 14:34:08 +02:00
feat(java): add support for constructors
This commit is contained in:
parent
7e2fef6ec5
commit
8b8129e730
3 changed files with 18 additions and 3 deletions
|
@ -8,6 +8,11 @@
|
|||
(#set! "kind" "Method")
|
||||
) @type
|
||||
|
||||
(constructor_declaration
|
||||
name: (identifier) @name
|
||||
(#set! "kind" "Constructor")
|
||||
) @type
|
||||
|
||||
(class_declaration
|
||||
name: (identifier) @name
|
||||
(#set! "kind" "Class")
|
||||
|
|
|
@ -29,7 +29,7 @@ describe("treesitter java", function()
|
|||
level = 0,
|
||||
lnum = 5,
|
||||
col = 0,
|
||||
end_lnum = 9,
|
||||
end_lnum = 10,
|
||||
end_col = 1,
|
||||
children = {
|
||||
{
|
||||
|
@ -59,15 +59,24 @@ describe("treesitter java", function()
|
|||
end_lnum = 8,
|
||||
end_col = 24,
|
||||
},
|
||||
{
|
||||
kind = "Constructor",
|
||||
name = "Cl_1",
|
||||
level = 1,
|
||||
lnum = 9,
|
||||
col = 2,
|
||||
end_lnum = 9,
|
||||
end_col = 12,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
kind = "Enum",
|
||||
name = "En_1",
|
||||
level = 0,
|
||||
lnum = 11,
|
||||
lnum = 12,
|
||||
col = 0,
|
||||
end_lnum = 11,
|
||||
end_lnum = 12,
|
||||
end_col = 13,
|
||||
},
|
||||
})
|
||||
|
|
|
@ -6,6 +6,7 @@ class Cl_1 {
|
|||
void meth_2() { }
|
||||
private int field_1;
|
||||
public Object field_2;
|
||||
Cl_1() { }
|
||||
}
|
||||
|
||||
enum En_1 { }
|
||||
|
|
Loading…
Reference in a new issue