Problem
When using leetcode.nvim with leetcode.cn, API requests sometimes timeout with the default 10s limit from
plenary.curl. This causes errors like:
'curl ...' was unable to complete in 10000 ms
This happens especially when fetching question details (by_title_slug query).
Current Behavior
- plenary.nvim has hardcoded 10s timeout
- leetcode.nvim doesn't pass timeout parameter to plenary.curl
- No user configuration exists to adjust this
Proposed Solution
Add a timeout option in leetcode.nvim config:
require("leetcode").setup({
timeout = 30000, -- ms, default 10000
})
Pass this to plenary.curl calls in lua/leetcode/api/utils.lua.
Workaround
Currently users must patch plenary.nvim/lua/plenary/curl.lua line 326 to increase timeout, but this gets
overwritten on Lazy sync.
Environment
- leetcode.cn (Chinese server, slower response)
- Network conditions vary
Problem
When using leetcode.nvim with leetcode.cn, API requests sometimes timeout with the default 10s limit from
plenary.curl. This causes errors like:
'curl ...' was unable to complete in 10000 ms
This happens especially when fetching question details (by_title_slug query).
Current Behavior
Proposed Solution
Add a
timeoutoption in leetcode.nvim config: