Skip to content

Commit 9940602

Browse files
committed
fix(file_operations): fix incorrect pcall to request_sync
1 parent b48f92b commit 9940602

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/astrolsp/file_operations.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ end
116116
---@param req string
117117
---@param params table
118118
local function getWorkspaceEdit(client, req, params)
119-
local success, resp = pcall(utils.request_sync, client, req, params, config.timeout)
120-
if success then return resp.result end
119+
local resp = utils.request_sync(client, req, params, config.timeout)
120+
if resp and resp.result then return resp.result end
121121
end
122122

123123
--- Notify LSP clients that file(s) are going to be created

0 commit comments

Comments
 (0)