Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
90ef60a
refactor: put all api-function into their own class.
L3MON4D3 Jun 17, 2025
af1420c
Add more documentation.
L3MON4D3 Jun 17, 2025
91dddd0
doc: add code for generating docstrings from annotations.
L3MON4D3 Jun 17, 2025
c314824
gitignore build artifacts from doc.
L3MON4D3 Jun 17, 2025
b7abead
finish doc for init.lua, document ChoiceNode.C, update luals-mdgen.
L3MON4D3 Jun 18, 2025
8b327ce
remove doc.json, is build artifact.
L3MON4D3 Jun 18, 2025
79e7ab1
ci: add DOC.md-generation to push workflow.
L3MON4D3 Jun 18, 2025
aec181e
whoops!
L3MON4D3 Jun 18, 2025
f34a4ac
remove old comment.
L3MON4D3 Jun 19, 2025
8605dc1
nix: update luals-mdgen.
L3MON4D3 Jun 19, 2025
58b431d
make sure there are empty lines before any lists.
L3MON4D3 Jun 19, 2025
0d86256
update dictionary.
L3MON4D3 Jun 19, 2025
6948930
ci: use aspell directly for running spellcheck.
L3MON4D3 Jun 19, 2025
5130823
move DOC-template.md into ./data/.
L3MON4D3 Jun 19, 2025
ea7ba6d
doc: specify special-case of textNode as a choice.
L3MON4D3 Jun 20, 2025
7113cfe
ci: fix spell workflow.
L3MON4D3 Jun 20, 2025
c334ff1
update luals-mdgen.
L3MON4D3 Jun 20, 2025
678b5bf
spellcheck: set locale-dependent encoding, fix spellcheck_interactive.
L3MON4D3 Jun 20, 2025
0b37dca
Auto generate docs
L3MON4D3 Jun 20, 2025
592a634
Format with stylua
L3MON4D3 Jun 20, 2025
9659b9d
doc: add panvimdoc and vimdoc make-step, use in ci.
L3MON4D3 Jun 22, 2025
a3e75ee
re-generate doc.
L3MON4D3 Jun 22, 2025
9611fc1
doc: don't be too verbose about return-values.
L3MON4D3 Jun 22, 2025
964cff2
doc: add newlines in long doc-blocks.
L3MON4D3 Jun 22, 2025
338d9a9
Auto generate docs
L3MON4D3 Jun 22, 2025
6e9fc6d
doc: s/--/---/
L3MON4D3 Jun 22, 2025
357800b
doc: make sure class-doc is above @class.
L3MON4D3 Jun 22, 2025
e15ad06
annotations: replace table<x,y> with {[x]: y}.
L3MON4D3 Jun 22, 2025
5857a31
annotations: make type a bit more strict.
L3MON4D3 Jun 22, 2025
407ebb9
regenerate doc.
L3MON4D3 Jun 22, 2025
ac1ee19
update helptags after updating vimdoc.
L3MON4D3 Jun 22, 2025
06e6084
use panvimdoc-fork.
L3MON4D3 Jun 22, 2025
cdeed19
annotations: add return-type for get_snip_env.
L3MON4D3 Jun 22, 2025
11a250d
generate api-doc as subsubsubheadings.
L3MON4D3 Jun 22, 2025
8484341
panvimdoc: drop unnecessary flag.
L3MON4D3 Jun 22, 2025
b9e6223
doc: generate DOC.md once with panvimdoc-links, once without.
L3MON4D3 Jun 22, 2025
bec3c1b
doc: add empty line before list.
L3MON4D3 Jun 22, 2025
0c90008
doc: generate documentation before running luals-mdgen.
L3MON4D3 Jun 23, 2025
c49fdb2
doc: update luals-mdgen.
L3MON4D3 Jun 23, 2025
4bf7206
LuaSnip.Choice -> LuaSnip.ChoiceNode.ItemNode.
L3MON4D3 Jun 23, 2025
da6eee4
Few annotations tweaks
bew Jun 23, 2025
e0b81c1
Include changes for the other comments on #1353
bew Jun 23, 2025
4bfc49c
Apply suggestions
bew Jun 23, 2025
62c62e9
Add in-comment indent in doc annotations for top-doc & line continuation
bew Jun 23, 2025
ae20fa1
re-generate doc.
L3MON4D3 Jun 23, 2025
f5cdf05
add missing annotations.
L3MON4D3 Jun 23, 2025
707f89e
update luals-mdgen.
L3MON4D3 Jun 23, 2025
b0fdce2
add one last missing parameter.
L3MON4D3 Jun 23, 2025
3ccbb4f
shuffle around choiceNode doc.
L3MON4D3 Jun 24, 2025
a70f977
update luals-mdgen.
L3MON4D3 Jun 24, 2025
a47e5aa
make sure links are formatted correctly.
L3MON4D3 Jun 24, 2025
cd0f3c4
add missing newline before list.
L3MON4D3 Jun 24, 2025
5be06e2
update panvimdoc.
L3MON4D3 Jun 24, 2025
68faade
upate luals-mdgen.
L3MON4D3 Jun 24, 2025
fe21c82
update luals-mdgen.
L3MON4D3 Jun 24, 2025
fb4b3fa
update panvimdoc.
L3MON4D3 Jun 25, 2025
d8cee89
doc: briefly expand how to create a `LuaSnip.Addable`.
L3MON4D3 Jun 25, 2025
fbbd855
doc: add missing explanation for clean_invalidated-opts.
L3MON4D3 Jun 25, 2025
c9f081a
update panvimdoc.
L3MON4D3 Jun 25, 2025
75baad0
doc: render vimdoc-markdown with textwidth 80.
L3MON4D3 Jun 25, 2025
bd39313
doc: remove conflicting `LuaSnip.Snippet` definition.
L3MON4D3 Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: update luals-mdgen.
  • Loading branch information
L3MON4D3 committed Jun 23, 2025
commit c49fdb281f5c2d8b8b1cf980b688ab53394dc56d
18 changes: 9 additions & 9 deletions DOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ ChoiceNodes allow choosing between multiple nodes.

<!-- panvimdoc-ignore-end -->

`c(pos, choices, opts): LuaSnip.ChoiceNode`: Create a new choiceNode.
`c(pos, choices, opts?): LuaSnip.ChoiceNode`: Create a new choiceNode.

* `pos: integer` Jump-index of the node (See [Basics-Jump-Index](#jump-index)).
* `choices: (LuaSnip.Node|LuaSnip.Node[])[]` A list of nodes that can be switched between. If a list
Expand Down Expand Up @@ -3801,7 +3801,7 @@ This function returns:

* `active_snip: LuaSnip.Snippet?` The active snippet if one exists, otherwise `nil`.

#### `get_snippets(ft, opts): (LuaSnip.Snippet[]|{ [string]: LuaSnip.Snippet[] })`
#### `get_snippets(ft?, opts?): (LuaSnip.Snippet[]|{ [string]: LuaSnip.Snippet[] })`

Retrieve snippets from luasnip.

Expand All @@ -3817,7 +3817,7 @@ This function returns:
* `snippets: (LuaSnip.Snippet[]|{ [string]: LuaSnip.Snippet[] })` Flat array when `ft` is non-nil,
otherwise a table mapping filetypes to snippets.

#### `available(snip_info): { [string]: T[] }`
#### `available(snip_info?): { [string]: T[] }`

Retrieve information about snippets available in the current file/at the current position (in case
treesitter-based filetypes are enabled).
Expand Down Expand Up @@ -3898,7 +3898,7 @@ inside a snippet and the current node can be jumped forward from.

Return whether the cursor is inside a snippet and the current node can be jumped forward from.

#### `snip_expand(snippet, opts): LuaSnip.ExpandedSnippet`
#### `snip_expand(snippet, opts?): LuaSnip.ExpandedSnippet`

Expand a snippet in the current buffer.

Expand Down Expand Up @@ -3956,7 +3956,7 @@ This function returns:

* `expanded_snip: LuaSnip.ExpandedSnippet` The snippet that was inserted into the buffer.

#### `expand(opts): boolean`
#### `expand(opts?): boolean`

Find a snippet whose trigger matches the text before the cursor and expand it.

Expand Down Expand Up @@ -3984,7 +3984,7 @@ This function returns:

* `did_jump_or_expand: boolean` Whether an action was performed.

#### `lsp_expand(body, opts)`
#### `lsp_expand(body, opts?)`

Expand a snippet specified in lsp-style.

Expand Down Expand Up @@ -4082,7 +4082,7 @@ This function returns:

* `id_snip: LuaSnip.Snippet`

#### `add_snippets(ft, snippets, opts)`
#### `add_snippets(ft?, snippets, opts?)`

Add snippets to luasnip's snippet-collection. This also calls `refresh_notify`.

Expand All @@ -4092,14 +4092,14 @@ Add snippets to luasnip's snippet-collection. This also calls `refresh_notify`.
filetype to a list of snippets, otherwise a flat table of snippets.
* `opts: LuaSnip.Opts.AddSnippets?` Optional arguments.

#### `clean_invalidated(opts)`
#### `clean_invalidated(opts?)`

Clean invalidated snippets from internal snippet storage. Invalidated snippets are still stored; it
might be useful to actually remove them as they still have to be iterated during expansion.

* `opts: LuaSnip.Opts.CleanInvalidated?` Additional, optional arguments.

#### `activate_node(opts)`
#### `activate_node(opts?)`

Lookup a node by position and activate (ie. jump into) it.

Expand Down
20 changes: 10 additions & 10 deletions doc/luasnip.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*luasnip.txt* For NeoVim 0.7-0.11 Last change: 2025 June 22
*luasnip.txt* For NeoVim 0.7-0.11 Last change: 2025 June 23

==============================================================================
Table of Contents *luasnip-table-of-contents*
Expand Down Expand Up @@ -756,7 +756,7 @@ ChoiceNodes allow choosing between multiple nodes.
}))
<

`c(pos, choices, opts): LuaSnip.ChoiceNode`: Create a new choiceNode.
`c(pos, choices, opts?): LuaSnip.ChoiceNode`: Create a new choiceNode.

- `pos: integer` Jump-index of the node (See |luasnip-basics-jump-index|).
- `choices: (LuaSnip.Node|LuaSnip.Node[])[]` A list of nodes that can be switched
Expand Down Expand Up @@ -3683,7 +3683,7 @@ Get the currently active snippet. This function returns:
- `active_snip: LuaSnip.Snippet?` The active snippet if one exists, otherwise `nil`.


get_snippets(ft, opts): (LuaSnip.Snippet[]|{ [string]: LuaSnip.Snippet[] }) *luasnip-api-get_snippets*
get_snippets(ft?, opts?): (LuaSnip.Snippet[]|{ [string]: LuaSnip.Snippet[] }) *luasnip-api-get_snippets*

Retrieve snippets from luasnip.

Expand All @@ -3698,7 +3698,7 @@ This function returns:
otherwise a table mapping filetypes to snippets.


available(snip_info): { [string]: T[] } *luasnip-api-available*
available(snip_info?): { [string]: T[] } *luasnip-api-available*

Retrieve information about snippets available in the current file/at the
current position (in case treesitter-based filetypes are enabled).
Expand Down Expand Up @@ -3794,7 +3794,7 @@ Return whether the cursor is inside a snippet and the current node can be
jumped forward from.


snip_expand(snippet, opts): LuaSnip.ExpandedSnippet *luasnip-api-snip_expand*
snip_expand(snippet, opts?): LuaSnip.ExpandedSnippet *luasnip-api-snip_expand*

Expand a snippet in the current buffer.

Expand Down Expand Up @@ -3853,7 +3853,7 @@ This function returns:
- `expanded_snip: LuaSnip.ExpandedSnippet` The snippet that was inserted into the buffer.


expand(opts): boolean *luasnip-api-expand*
expand(opts?): boolean *luasnip-api-expand*

Find a snippet whose trigger matches the text before the cursor and expand it.

Expand Down Expand Up @@ -3883,7 +3883,7 @@ Expand at the cursor, or jump forward. This function returns:
- `did_jump_or_expand: boolean` Whether an action was performed.


lsp_expand(body, opts) *luasnip-api-lsp_expand*
lsp_expand(body, opts?) *luasnip-api-lsp_expand*

Expand a snippet specified in lsp-style.

Expand Down Expand Up @@ -4001,7 +4001,7 @@ This function returns:
- `id_snip: LuaSnip.Snippet`


add_snippets(ft, snippets, opts) *luasnip-api-add_snippets*
add_snippets(ft?, snippets, opts?) *luasnip-api-add_snippets*

Add snippets to luasnip’s snippet-collection. This also calls
`refresh_notify`.
Expand All @@ -4013,7 +4013,7 @@ Add snippets to luasnip’s snippet-collection. This also calls
- `opts: LuaSnip.Opts.AddSnippets?` Optional arguments.


clean_invalidated(opts) *luasnip-api-clean_invalidated*
clean_invalidated(opts?) *luasnip-api-clean_invalidated*

Clean invalidated snippets from internal snippet storage. Invalidated snippets
are still stored; it might be useful to actually remove them as they still have
Expand All @@ -4022,7 +4022,7 @@ to be iterated during expansion.
- `opts: LuaSnip.Opts.CleanInvalidated?` Additional, optional arguments.


activate_node(opts) *luasnip-api-activate_node*
activate_node(opts?) *luasnip-api-activate_node*

Lookup a node by position and activate (ie. jump into) it.

Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading