Skip to content

Commit

Permalink
Add a initialize_timeout_sec adapter option to delay warning (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckipp01 committed Dec 10, 2021
1 parent b17d513 commit 3b3027e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/dap/session.lua
Expand Up @@ -847,8 +847,12 @@ function Session:initialize(config, adapter)
end)
end)
local sec_to_ms = 1000
local sec_to_wait = 4
if adapter.options and adapter.options.initialize_timeout_sec then
sec_to_wait = adapter.options.initialize_timeout_sec
end
local timer = vim.loop.new_timer()
timer:start(4 * sec_to_ms, 0, function()
timer:start(sec_to_wait * sec_to_ms, 0, function()
timer:stop()
timer:close()
if not adapter_responded then
Expand Down

0 comments on commit 3b3027e

Please sign in to comment.