docs: api, messages, lsp, trust

gen_vimdoc.lua: In prepare for the upcoming release, comment-out the
"Experimental" warning for prerelease features.
This commit is contained in:
Justin M. Keyes
2026-02-12 14:16:47 +01:00
parent 4aeeaa8027
commit b8a976afda
47 changed files with 614 additions and 492 deletions

View File

@@ -512,6 +512,9 @@ local function should_render_field_or_param(p)
and not vim.startswith(p.name, '_')
end
--- Gets a field's description and its "(default: …)" value, if any (see `lsp/client.lua` for
--- examples).
---
--- @param desc? string
--- @return string?, string?
local function get_default(desc)
@@ -801,13 +804,18 @@ local function render_fun(fun, classes, cfg)
if fun.since then
local since = assert(tonumber(fun.since), 'invalid @since on ' .. fun.name)
local info = nvim_api_info()
if since == 0 or (info.prerelease and since == info.level) then
local nvim_api = nvim_api_info()
_ = nvim_api -- Disable prerelease "WARNING" doc, in preparation for for upcoming release.
if
since == 0 --[[or (nvim_api.prerelease and since == nvim_api.level)]]
then
-- Experimental = (since==0 or current prerelease)
local s = 'WARNING: This feature is experimental/unstable.'
table.insert(ret, md_to_vimdoc(s, INDENTATION, INDENTATION, TEXT_WIDTH))
table.insert(ret, '\n')
else
end
if since > 0 then
local v = assert(util.version_level[since], 'invalid @since on ' .. fun.name)
fun.attrs = fun.attrs or {}
table.insert(fun.attrs, fmt('Since: %s', v))