From f3ba4e954c77a8c3b8cbed566398890894f7c06a Mon Sep 17 00:00:00 2001 From: Lukas Reineke Date: Sun, 22 May 2022 00:25:31 +0900 Subject: [PATCH] Version 2.4.1 Fix `force` option when `sync` is true --- doc/format.txt | 5 ++++- lua/lsp-format/init.lua | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/format.txt b/doc/format.txt index e83f9a7..9fff8a3 100644 --- a/doc/format.txt +++ b/doc/format.txt @@ -2,7 +2,7 @@ Author: Lukas Reineke -Version: 2.4.0 +Version: 2.4.1 ============================================================================== CONTENTS *lsp-format* @@ -135,6 +135,9 @@ force *lsp-format-force* ============================================================================== 5. CHANGELOG *lsp-format-changelog* +2.4.1 + Fix `force` option when `sync` is true + 2.4.0 Add `force` option diff --git a/lua/lsp-format/init.lua b/lua/lsp-format/init.lua index 6449b83..dd1f118 100644 --- a/lua/lsp-format/init.lua +++ b/lua/lsp-format/init.lua @@ -191,7 +191,7 @@ M._format = function(bufnr, client, format_options) local timeout_ms = 2000 if format_options.sync then local result = client.request_sync(method, params, timeout_ms, bufnr) or {} - M._handler(result.err, result.result, { client_id = client.id, bufnr = bufnr }) + M._handler(result.err, result.result, { client_id = client.id, bufnr = bufnr, params = params }) else client.request(method, params, M._handler, bufnr) end