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

@@ -68,9 +68,11 @@ local all_clients = {}
--- (default: `true`)
--- @field detached? boolean
---
--- Milliseconds to wait for server to exit cleanly after sending the "shutdown" request before
--- sending kill -15. If set to false, waits indefinitely. If set to true, nvim will kill the
--- server immediately.
--- Decides if/when to force-stop the server after sending the "shutdown" request. See |Client:stop()|.
--- Note: when Nvim itself is exiting,
--- - `false`: Nvim will not force-stop LSP server(s).
--- - `true`: Nvim will force-stop LSP server(s) that did not comply with the "shutdown" request.
--- - `number`: Nvim will wait up to `exit_timeout` milliseconds before performing force-stop.
--- (default: `false`)
--- @field exit_timeout? integer|boolean
---
@@ -156,9 +158,7 @@ local all_clients = {}
--- Capabilities provided at runtime (after startup).
--- @field dynamic_capabilities lsp.DynamicCapabilities
---
--- Milliseconds to wait for server to exit cleanly after sending the "shutdown" request before
--- sending kill -15. If set to false, waits indefinitely. If set to true, nvim will kill the
--- server immediately.
--- See [vim.lsp.ClientConfig].
--- (default: `false`)
--- @field exit_timeout integer|boolean
---
@@ -852,20 +852,19 @@ end
--- Stops a client, optionally with force after a timeout.
---
--- By default, it will request the server to shutdown, then force a shutdown
--- if the server has not exited after `self.exit_timeout` milliseconds. If
--- you request to stop a client which has previously been requested to
--- shutdown, it will automatically escalate and force shutdown immediately,
--- regardless of the value of `force` (or `self.exit_timeout` if `nil`).
--- By default this sends a "shutdown" request to the server, escalating to force-stop if the server
--- has not exited after `self.exit_timeout` milliseconds (unless `exit_timeout=false`).
--- Calling stop() on a client that was previously requested to shutdown, will escalate to
--- force-stop immediately, regardless of `force` (or `self.exit_timeout` if `force=nil`).
---
--- Note: Forcing shutdown while a server is busy writing out project or index
--- files can lead to file corruption.
--- Note: Forcing shutdown while a server is busy writing out project or index files can lead to
--- file corruption.
---
--- @param force? integer|boolean Time in milliseconds to wait before forcing
--- a shutdown. If false, only request the
--- server to shutdown, but don't force it. If
--- true, force a shutdown immediately.
--- (default: `self.exit_timeout`)
--- @param force? integer|boolean (default: `self.exit_timeout`) Decides whether to force-stop the server.
--- - `nil`: Defaults to `exit_timeout` from |vim.lsp.ClientConfig|.
--- - `true`: Force-stop after "shutdown" request.
--- - `false`: Do not force-stop after "shutdown" request.
--- - number: Wait up to `force` milliseconds before force-stop.
function Client:stop(force)
validate('force', force, { 'number', 'boolean' }, true)