Skip to content

Commit 67eebb0

Browse files
committed
refactor: requires and logging
1 parent c2c7cb4 commit 67eebb0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lua/copilot/lsp/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
local logger = require("copilot.logger")
22

33
local M = {
4-
binary = require("copilot/lsp/binary"),
5-
nodejs = require("copilot/lsp/nodejs"),
4+
binary = require("copilot.lsp.binary"),
5+
nodejs = require("copilot.lsp.nodejs"),
66
---@type ServerConfig
77
config = nil,
88
}

lua/copilot/suggestion/init.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,15 +602,15 @@ function M.accept(modifier)
602602
end
603603

604604
with_client(function(client)
605-
local ok, _ = pcall(function()
605+
local ok, err = pcall(function()
606606
api.notify_accepted(
607607
client,
608608
{ uuid = suggestion.uuid, acceptedLength = util.strutf16len(suggestion.text) },
609609
function() end
610610
)
611611
end)
612612
if not ok then
613-
logger.error(string.format("failed to notify_accepted for: %s, Error: %s", suggestion.text))
613+
logger.error(string.format("failed to notify_accepted for: %s, Error: %s", suggestion.text, err))
614614
end
615615
end)
616616

0 commit comments

Comments
 (0)