Cannot list leetcode problems
I followed the instructions in the readme, signed in to firefox (which worked fine), and added the necessary config options. However when I try to list the problems, I have a list index out of range error. I've tried both the remap and the :LeetCodeList command but get the same error regardless
I'm using neovim (v0.11.0-dev) on Pop!OS 22.04 LTS with a lua init file instead of vimscript. I made sure to not make any syntax errors that I could notice but i'm uploading the configuration here if in case I am just that stupid. If so, please let me know lol.
init.lua:
-- Leetcode
Plug('ianding1/leetcode.vim')
vim.keymap.set("n", "<leader>ll", ":LeetCodeList<CR>'")
vim.keymap.set("n", "<leader>lt", ":LeetCodeTest<CR>'")
vim.keymap.set("n", "<leader>ls", ":LeetCodeSubmit<CR>'")
vim.keymap.set("n", "<leader>li", ":LeetCodeSignIn<CR>'")
vim.g.leetcode_browser = 'firefox'
vim.g.leetcode_solution_filetype = 'python3'
+1 same issue
cannot get topics
Error detected while processing function leetcode#ListProblems:
line 31:
E684: list index out of range: 0
Press ENTER or type command to continue
I fixed it by using lazyvim instead of vimplug if that's of any help.
same issue
please help with vimplug and key bindings
I only found a solution, but the issue still persists. In the leetcode.py file, around line 578, change the code to the following:
if res.status_code != 200:
# _echoerr('cannot get topics')
return {
'topics': [],
'companies': []
}