Skip to content

Commit

Permalink
docs: mark opts parameter as optional in generate function (#195)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
escwxyz authored Aug 22, 2024
1 parent 2cad4d6 commit d242dd3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neogen/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit d242dd3

Please sign in to comment.