From d242dd34622c33df9a8feca2f5e677c124004fc1 Mon Sep 17 00:00:00 2001 From: J <124119483+escwxyz@users.noreply.github.com> Date: Thu, 22 Aug 2024 16:40:50 +0800 Subject: [PATCH] docs: mark `opts` parameter as optional in `generate` function (#195) Update the LuaLS/EmmyLua annotation for the `generate` function to explicitly mark the `opts` parameter as optional. This change aligns the documentation with the existing implementation and resolves language server warnings when calling the function without arguments. --- lua/neogen/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/neogen/init.lua b/lua/neogen/init.lua index 7427d85..160d6c7 100644 --- a/lua/neogen/init.lua +++ b/lua/neogen/init.lua @@ -147,7 +147,7 @@ neogen.configuration = { --- For example, if you are inside a function, and called `generate({ type = "func" })`, --- Neogen will go until the start of the function and start annotating for you. --- ----@param opts table Optional configs to change default behaviour of generation. +---@param opts? table Optional configs to change default behaviour of generation. --- - {opts.type} `(string, default: "any")` Which type we are trying to use for generating annotations. --- Currently supported: `any`, `func`, `class`, `type`, `file` --- - {opts.annotation_convention} `(table)` convention to use for generating annotations.