mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
lsp: fix lsp.buf.formatting_sync() null response (#12752)
Co-authored-by: tim apple <tim@tims-MacBook-Pro.local>
This commit is contained in:
committed by
GitHub
parent
f3b5531ae8
commit
01ae5e7c38
@@ -142,6 +142,7 @@ function M.formatting_sync(options, timeout_ms)
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/formatting", params, timeout_ms)
|
||||
if not result then return end
|
||||
result = result[1].result
|
||||
if not result then return end
|
||||
vim.lsp.util.apply_text_edits(result)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user