From 291fb5d98c76765ea8227ecf0bec7d83f8543bd4 Mon Sep 17 00:00:00 2001 From: danymat Date: Tue, 25 Jan 2022 21:12:39 +0100 Subject: [PATCH] (lua) Update configurations (#43) --- lua/neogen/configurations/lua.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/neogen/configurations/lua.lua b/lua/neogen/configurations/lua.lua index 4826d02..2e179b2 100644 --- a/lua/neogen/configurations/lua.lua +++ b/lua/neogen/configurations/lua.lua @@ -63,7 +63,7 @@ end return { -- Search for these nodes parent = { - func = { "function", "local_function", "local_variable_declaration", "field", "variable_declaration" }, + func = { "function_declaration", "assignment_statement", "variable_declaration" }, class = { "local_variable_declaration", "variable_declaration" }, type = { "local_variable_declaration", "variable_declaration" }, file = { "chunk" }, @@ -72,7 +72,7 @@ return { data = { func = { -- When the function is inside one of those - ["local_variable_declaration|field|variable_declaration"] = { + ["variable_declaration|assignment_statement"] = { ["0"] = { extract = function(node) return function_extractor(node, "local") @@ -80,7 +80,7 @@ return { }, }, -- When the function is in the root tree - ["function|local_function"] = { + ["function_declaration"] = { ["0"] = { extract = function(node) return function_extractor(node, "function")