aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-04-30 17:23:50 +0200
committerGitHub <noreply@github.com>2022-04-30 17:23:50 +0200
commit88411613e23bd829088f48983f0253f1b7e5c3fd (patch)
tree20b651ac4c5adf9bec31ea6c1cfb81fd3b768c1a /runtime/doc
parent338b9032194a4bc4c98439eb00f65a8ec86609f2 (diff)
downloadrneovim-88411613e23bd829088f48983f0253f1b7e5c3fd.tar.gz
rneovim-88411613e23bd829088f48983f0253f1b7e5c3fd.tar.bz2
rneovim-88411613e23bd829088f48983f0253f1b7e5c3fd.zip
feat(lsp): add async option to vim.lsp.buf.format (#18322)
Deprecates the existing `vim.lsp.buf.formatting` function. With this, `vim.lsp.buf.format` will replace all three: - vim.lsp.buf.formatting - vim.lsp.buf.formatting_sync - vim.lsp.buf.formatting_seq_sync
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lsp.txt8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index d5ee959c36..f55c959a03 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1060,9 +1060,8 @@ format({options}) *vim.lsp.buf.format()*
See also: ~
https://microsoft.github.io/language-server-protocol/specification#textDocument_formatting
• timeout_ms (integer|nil, default 1000): Time in
- milliseconds to block for formatting requests.
- Formatting requests are current synchronous to prevent
- editing of the buffer.
+ milliseconds to block for formatting requests. No effect
+ if async=true
• bufnr (number|nil): Restrict formatting to the clients
attached to the given buffer, defaults to the current
buffer (0).
@@ -1081,6 +1080,9 @@ format({options}) *vim.lsp.buf.format()*
end
}
<
+ • async boolean|nil If true the method won't block.
+ Defaults to false. Editing the buffer while formatting
+ asynchronous can lead to unexpected changes.
• id (number|nil): Restrict formatting to the client with
ID (client.id) matching this field.
• name (string|nil): Restrict formatting to the client