diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2024-10-04 02:13:31 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-04 02:13:31 -0700 |
| commit | b45c50f3140e7ece593f2126840900f5cc3d39ea (patch) | |
| tree | 20e9c304a14f129c26be769f9171dba0bcaba5b9 /runtime/doc/develop.txt | |
| parent | f62728cd80a9c458b1c0ef7c5c1251e55fe91090 (diff) | |
| download | rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.tar.gz rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.tar.bz2 rneovim-b45c50f3140e7ece593f2126840900f5cc3d39ea.zip | |
docs: render `@since` versions, 0 means experimental #30649
An implication of this current approach is that `NVIM_API_LEVEL` should be
bumped when a new Lua function is added.
TODO(future): add a lint check which requires `@since` on all new functions.
ref #25416
Diffstat (limited to 'runtime/doc/develop.txt')
| -rw-r--r-- | runtime/doc/develop.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 9dbdaec31c..ee7fa808f2 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -247,6 +247,10 @@ Docstring format: - References are written as `[tag]` - Use ``` for code samples. Code samples can be annotated as `vim` or `lua` +- Use `@since <api-level>` to note the |api-level| when the function became + "stable". If `<api-level>` is greater than the current stable release (or + 0), it is marked as "experimental". + - See scripts/util.lua for the mapping of api-level to Nvim version. - Use `@nodoc` to prevent documentation generation. - Use `@inlinedoc` to inline `@class` blocks into `@param` blocks. E.g. >lua @@ -271,7 +275,7 @@ Docstring format: - {somefield}? (integer) Documentation for some field < -- Files which has `@meta` are only used for typing and documentation. +- Files declared as `@meta` are only used for typing and documentation (similar to "*.d.ts" typescript files). Example: the help for |vim.paste()| is generated from a docstring decorating vim.paste in runtime/lua/vim/_editor.lua like this: > @@ -288,6 +292,7 @@ vim.paste in runtime/lua/vim/_editor.lua like this: > --- end)() --- ``` --- + --- @since 12 --- @see |paste| --- --- @param lines ... |