mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 11:15:14 -07: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:
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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user