From efdb89228ee5585b04dec8eb0e3d9ca0b511e9f3 Mon Sep 17 00:00:00 2001 From: kevinhwang91 Date: Tue, 1 Feb 2022 03:34:37 +0800 Subject: [PATCH] fix(lua): missing return statement for function type --- lua/neogen/configurations/lua.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/neogen/configurations/lua.lua b/lua/neogen/configurations/lua.lua index 3c6f4cd..3cc6c0d 100644 --- a/lua/neogen/configurations/lua.lua +++ b/lua/neogen/configurations/lua.lua @@ -15,7 +15,13 @@ local function_extractor = function(node, type) { retrieve = "all", node_type = "spread", extract = true }, }, }, - { retrieve = "first", node_type = "return_statement", extract = true }, + { + retrieve = "first", + node_type = "block", + subtree = { + { retrieve = "first", node_type = "return_statement", extract = true }, + }, + } } if type == "local" then