diff options
author | beardedsakimonkey <54521218+beardedsakimonkey@users.noreply.github.com> | 2020-09-12 09:39:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 18:39:52 +0200 |
commit | 01ae5e7c385e2e4996db3ef217be8e0b30fb370b (patch) | |
tree | 49ca466735f848427d7d428329cac584f84c986a /runtime/lua/vim/lsp/buf.lua | |
parent | f3b5531ae81e1ccab0c38dfa68f262070eefd08f (diff) | |
download | rneovim-01ae5e7c385e2e4996db3ef217be8e0b30fb370b.tar.gz rneovim-01ae5e7c385e2e4996db3ef217be8e0b30fb370b.tar.bz2 rneovim-01ae5e7c385e2e4996db3ef217be8e0b30fb370b.zip |
lsp: fix lsp.buf.formatting_sync() null response (#12752)
Co-authored-by: tim apple <tim@tims-MacBook-Pro.local>
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 208082f241..3060776d83 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -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 |