From 35d36abb8cc55a603f4e36aa3747cf97c8bec3d2 Mon Sep 17 00:00:00 2001 From: danymat Date: Wed, 10 Nov 2021 22:58:28 +0100 Subject: [PATCH] (java) Add constructor annotation --- lua/neogen/configurations/java.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/neogen/configurations/java.lua b/lua/neogen/configurations/java.lua index ef7d390..5dd87f0 100644 --- a/lua/neogen/configurations/java.lua +++ b/lua/neogen/configurations/java.lua @@ -1,11 +1,18 @@ return { parent = { class = { "class_declaration" }, - func = { "method_declaration" }, + func = { "method_declaration", "constructor_declaration" }, }, data = { func = { + ["constructor_declaration"] = { + ["0"] = { + extract = function(_) + return { class_declaration = {} } + end, + }, + }, ["method_declaration"] = { ["0"] = { extract = function(node)