Skip to content

Commit 688762a

Browse files
committed
feat(client): show node version warning on exit with error
1 parent c54ebfd commit 688762a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lua/copilot/client.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,13 @@ local function prepare_client_config(overrides)
207207
end)
208208
end)
209209
end,
210-
on_exit = function(_code, _signal, client_id)
210+
on_exit = function(code, _signal, client_id)
211+
if code > 0 then
212+
vim.schedule(function()
213+
-- in case for unsupported node
214+
M.get_node_version()
215+
end)
216+
end
211217
if M.id == client_id then
212218
M.id = nil
213219
M.capabilities = nil

0 commit comments

Comments
 (0)