diff options
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 105e7c4621..7bbe3637db 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1719,9 +1719,9 @@ function lsp.formatexpr(opts) local client_results = vim.lsp.buf_request_sync(0, "textDocument/rangeFormatting", params, timeout_ms) -- Apply the text edits from one and only one of the clients. - for _, response in pairs(client_results) do + for client_id, response in pairs(client_results) do if response.result then - vim.lsp.util.apply_text_edits(response.result, 0) + vim.lsp.util.apply_text_edits(response.result, 0, vim.lsp.get_client_by_id(client_id).offset_encoding) return 0 end end |