[docgen] Update doc/neogen.txt
skip-checks: true
This commit is contained in:
@@ -36,10 +36,10 @@ Check out the up-to-date readme section: https://github.com/danymat/neogen#suppo
|
|||||||
`neogen.setup`({opts})
|
`neogen.setup`({opts})
|
||||||
Module setup
|
Module setup
|
||||||
|
|
||||||
Parameters~
|
Parameters ~
|
||||||
{opts} `(table)` Config table (see |neogen.configuration|)
|
{opts} `(table)` Config table (see |neogen.configuration|)
|
||||||
|
|
||||||
Usage~
|
Usage ~
|
||||||
`require('neogen').setup({})` (replace `{}` with your `config` table)
|
`require('neogen').setup({})` (replace `{}` with your `config` table)
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
@@ -148,7 +148,7 @@ It'll try to find the first parent that matches a certain type.
|
|||||||
For example, if you are inside a function, and called `generate({ type = "func" })`,
|
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.
|
Neogen will go until the start of the function and start annotating for you.
|
||||||
|
|
||||||
Parameters~
|
Parameters ~
|
||||||
{opts} `(table)` Optional configs to change default behaviour of generation.
|
{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.
|
- {opts.type} `(string, default: "any")` Which type we are trying to use for generating annotations.
|
||||||
Currently supported: `any`, `func`, `class`, `type`, `file`
|
Currently supported: `any`, `func`, `class`, `type`, `file`
|
||||||
@@ -183,7 +183,7 @@ Feel free to submit a PR, I will be happy to help you !
|
|||||||
We use semantic versioning ! (https://semver.org)
|
We use semantic versioning ! (https://semver.org)
|
||||||
Here is the current Neogen version:
|
Here is the current Neogen version:
|
||||||
>
|
>
|
||||||
neogen.version = "2.15.2"
|
neogen.version = "2.15.3"
|
||||||
<
|
<
|
||||||
# Changelog~
|
# Changelog~
|
||||||
|
|
||||||
@@ -295,7 +295,7 @@ corresponding to annotation conventions,
|
|||||||
as well as providing custom configurations in order to be precise about
|
as well as providing custom configurations in order to be precise about
|
||||||
how to customize the annotations.
|
how to customize the annotations.
|
||||||
|
|
||||||
Type~
|
Type ~
|
||||||
neogen.TemplateConfig
|
neogen.TemplateConfig
|
||||||
|
|
||||||
Default values:
|
Default values:
|
||||||
@@ -310,16 +310,16 @@ Default values:
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
# neogen.TemplateConfig~
|
# neogen.TemplateConfig~
|
||||||
|
|
||||||
Class~
|
Class ~
|
||||||
{neogen.TemplateConfig} see |template_config|
|
{neogen.TemplateConfig} see |template_config|
|
||||||
Fields~
|
Fields ~
|
||||||
{annotation_convention} `(string)` select which annotation convention to use
|
{annotation_convention} `(string)` select which annotation convention to use
|
||||||
{use_default_comment} `(boolean)` Prepend default filetype comment before a annotation
|
{use_default_comment} `(boolean)` Prepend default filetype comment before a annotation
|
||||||
{append} `(optional)` neogen.TemplateConfig.Append custom placement of the annotation
|
{append} `(optional)` neogen.TemplateConfig.Append custom placement of the annotation
|
||||||
{position} `(fun(node: userdata, type: string): number,number)` Provide an absolute position for the annotation
|
{position} `(fun(node: userdata, type: string): number,number)` Provide an absolute position for the annotation
|
||||||
If values are `nil`, use default positioning
|
If values are `nil`, use default positioning
|
||||||
|
|
||||||
Class~
|
Class ~
|
||||||
{neogen.TemplateConfig.Append}
|
{neogen.TemplateConfig.Append}
|
||||||
{child_name} `(string)` Which child node to use for appending the annotation
|
{child_name} `(string)` Which child node to use for appending the annotation
|
||||||
{fallback} `(string)` Node to fallback if `child_name` is not found
|
{fallback} `(string)` Node to fallback if `child_name` is not found
|
||||||
@@ -445,9 +445,9 @@ Last step, if you want to use your own annotation convention for a language:
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
# neogen.AnnotationLine~
|
# neogen.AnnotationLine~
|
||||||
|
|
||||||
Class~
|
Class ~
|
||||||
{neogen.AnnotationLine.Opts}
|
{neogen.AnnotationLine.Opts}
|
||||||
Fields~
|
Fields ~
|
||||||
{no_results} `(boolean)` If true, will only generate the line if there are no values returned by the configuration
|
{no_results} `(boolean)` If true, will only generate the line if there are no values returned by the configuration
|
||||||
{type} `(string[])` If specified, will only generate the line for the required types.
|
{type} `(string[])` If specified, will only generate the line for the required types.
|
||||||
If not specified, will use this line for all types.
|
If not specified, will use this line for all types.
|
||||||
|
|||||||
Reference in New Issue
Block a user