Skip to content

Commit

Permalink
chore(build): auto-generate vimdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
astronvimbot committed Jan 19, 2024
1 parent 3ce0a13 commit 840dd15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,23 +166,23 @@ function astrocore.is_available(plugin: string)


```lua
function astrocore.list_insert_unique(lst: any[]|nil, vals: any)
function astrocore.list_insert_unique(lst: any[]|nil, ...any)
-> any[]
```

Insert one or more values into a list like table and maintain that you do not insert non-unique values (THIS MODIFIES `lst`)

*param* `lst` — The list like table that you want to insert into

*param* `vals`Either a list like table of values to be inserted or a single value to be inserted
*param* `...`Values to be inserted

*return* — The modified list like table

### load_plugin_with_func


```lua
function astrocore.load_plugin_with_func(plugin: string, module: table, func_names: string|string[])
function astrocore.load_plugin_with_func(plugin: string, module: table, ...string)
```

A helper function to wrap a module function to require a plugin before running
Expand All @@ -191,7 +191,7 @@ function astrocore.load_plugin_with_func(plugin: string, module: table, func_nam

*param* `module` — The system module where the functions live (e.g. `vim.ui`)

*param* `func_names` — The functions to wrap in the given module (e.g. `{ "ui", "select }`)
*param* `...` — The functions to wrap in the given module (e.g. `"ui", "select"`)

### notify

Expand Down
13 changes: 6 additions & 7 deletions doc/astrocore.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*astrocore.txt* For Neovim >= 0.9.0 Last change: 2024 January 16
*astrocore.txt* For Neovim >= 0.9.0 Last change: 2024 January 19

==============================================================================
Table of Contents *astrocore-table-of-contents*
Expand Down Expand Up @@ -354,7 +354,7 @@ _return_ `available` — Whether the plugin is available
LIST_INSERT_UNIQUE ~

>lua
function astrocore.list_insert_unique(lst: any[]|nil, vals: any)
function astrocore.list_insert_unique(lst: any[]|nil, ...any)
-> any[]
<

Expand All @@ -363,16 +363,15 @@ insert non-unique values (THIS MODIFIES `lst`)

_param_ `lst` — The list like table that you want to insert into

_param_ `vals` — Either a list like table of values to be inserted or a
single value to be inserted
_param_ `...` — Values to be inserted

_return_ — The modified list like table


LOAD_PLUGIN_WITH_FUNC ~

>lua
function astrocore.load_plugin_with_func(plugin: string, module: table, func_names: string|string[])
function astrocore.load_plugin_with_func(plugin: string, module: table, ...string)
<

A helper function to wrap a module function to require a plugin before running
Expand All @@ -382,8 +381,8 @@ _param_ `plugin` — The plugin to call `require("lazy").load` with
_param_ `module` — The system module where the functions live
(e.g. `vim.ui`)

_param_ `func_names` — The functions to wrap in the given module (e.g. `{
"ui", "select }`)
_param_ `...` — The functions to wrap in the given module (e.g. `"ui",
"select"`)


NOTIFY ~
Expand Down

0 comments on commit 840dd15

Please sign in to comment.