Closed VinnyT456 closed 11 months ago
Yes, I'm on the latest commit
leetcode.nvim 5.01ms
428b764 fix(auth): `user_fields` (2 hours ago)
4a00ed3 docs: license (3 hours ago)
e443c14 fix(cookie): require verified account (3 hours ago)
3c6a7ff feat!: new cache format (4 hours ago)
84d8cd2 fix: sql submission accepted (5 hours ago)
d49f7a2 fix: improvements (5 hours ago)
2efc794 feat: improved sql support (6 hours ago)
51637c1 fix(result): improved compile error handler (21 hours ago)
Can you try removing .cookie
and .problemlist
inside leetcode.nvim
home directory
In the lua/leetcode/cache
folder right?
do :lua print(vim.fn.stdpath("data") .. "/leetcode/")
done but I don't have that folder in my ~/.local/share/nvim/
does it work now?
It just keeps on stopping at this screen with the error.
can you add branch = "dev"
inside
return {
"kawre/leetcode.nvim",
build = ":TSUpdate html",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"nvim-tree/nvim-web-devicons",
"rcarriga/nvim-notify",
},
opts = {
console = {
open_on_runcode = true,
size = {
width = "100%", ---@type string | integer
height = "95%", ---@type string | integer
},
dir = "row", ---@type "col" | "row"
},
lang = "python3",
description = {
width = "100%", ---@type string | integer
}
},
config = function(_, opts)
vim.keymap.set("n", "<leader>lq", "<cmd>LcQuestionTabs<cr>")
vim.keymap.set("n", "<leader>lm", "<cmd>LcMenu<cr>")
vim.keymap.set("n", "<leader>lc", "<cmd>LcConsole<cr>")
vim.keymap.set("n", "<leader>ll", "<cmd>LcLanguage<cr>")
vim.keymap.set("n", "<leader>ld", "<cmd>LcDescriptionToggle<cr>")
vim.keymap.set("n", "<leader>lr", "<cmd>LcRun<cr>")
vim.keymap.set("n", "<leader>ls", "<cmd>LcSubmit<cr>")
require("leetcode").setup(opts)
end,
}
and run :Lazy update leetcode.nvim
I managed to get in but for some reason there is only 1 question in the list for the problems
It's because of #8 . I would recommend to delete :lua print(vim.fn.stdpath("data") .. "/leetcode/")
directory
Sorry but I deleted that directory but there is still only one question in the problems list.
Then go to Menu > Cache > Update
and it should work
Still not working
It's actually leetcode having problems rn. I can't even enter their site
Ok, I will try again later and see if it works thank you for your help.
Leetcode is back but it's still not working after the Menu
> Cache > Update`
do you get the problemlist cache updated
notification?
yeah it gives me that notification
Idk, it might be a problem with lazynvim not actually loading the new version, because the issues you are getting were fixed a few commits ago. Can you play around with commands like Lazy sync
, Lazy clean
, Lazy update
, Lazy build
also try deleting ~/.local/share/nvim/lazy/leetcode.nvim/
ok
Are you 10000% sure that you deleted the home directory file? you can also use lua print(require("leetcode.config").home:absolute())
after you entered into leetcode.nvim
to see the home dir path
Yes I deleted the file that you said above and here is the output of the lua print(require("leetcode.config").home:absolute())
~/.local/share/nvim/leetcode
If you have deleted ~/.local/share/nvim/leetcode
and ~/.local/share/nvim/lazy/leetcode.nvim
and you still get only one record then i can't really think of any solution right now. I will try to find one and let you know if i do find it
ok thank you for your time to help me.
I've also been having a similar issue regarding this error.
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.0-beta3
Error executing vim.schedule lua callback: .../share/nvim/lazy/leetcode.nvim/lua/leetcode/api/auth.lua:9: attempt to index local 'res' (a nil value)
stack traceback:
.../share/nvim/lazy/leetcode.nvim/lua/leetcode/api/auth.lua:9: in function 'update_cfg_auth'
.../share/nvim/lazy/leetcode.nvim/lua/leetcode/api/auth.lua:53: in function 'cb'
...share/nvim/lazy/leetcode.nvim/lua/leetcode/api/utils.lua:83: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
I've had to revert back to commit 4d3bbce
in order for the plugin to work again.
This is my config
return {
"kawre/leetcode.nvim",
build = ":TSUpdate html",
-- enabled = false,
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim", -- required by telescope
"MunifTanjim/nui.nvim",
-- optional
-- "nvim-tree/nvim-web-devicons",
-- recommended
-- "rcarriga/nvim-notify",
},
branch = "master",
commit = "4d3bbce",
opts = {
-- configuration goes here
domain = "com", -- For now "com" is the only one supported
---@type lc.lang
lang = "python3",
---@type lc.sql_lang
sql = "mysql",
---@type string
directory = vim.fn.stdpath("data") .. "/leetcode/",
---@type boolean
logging = true,
console = {
open_on_runcode = true,
size = {
width = "50%", ---@type string | integer
height = "50%", ---@type string | integer
},
dir = "row", ---@type "col" | "row"
},
description = {
width = "40%", ---@type string | integer
},
arg = "leetcode",
},
config = function(_, opts)
vim.keymap.set("n", "<leader>lq", "<cmd>LcQuestionTabs<cr>")
vim.keymap.set("n", "<leader>lm", "<cmd>LcMenu<cr>")
vim.keymap.set("n", "<leader>lc", "<cmd>LcConsole<cr>")
vim.keymap.set("n", "<leader>ll", "<cmd>LcLanguage<cr>")
vim.keymap.set("n", "<leader>ld", "<cmd>LcDescriptionToggle<cr>")
vim.keymap.set("n", "<leader>lr", "<cmd>LcRun<cr>")
vim.keymap.set("n", "<leader>ls", "<cmd>LcSubmit<cr>")
require("leetcode").setup(opts)
end,
}
Reverted master branch to 51637c1. Let me know if it fixes your issues.
If you have deleted
~/.local/share/nvim/leetcode
and~/.local/share/nvim/lazy/leetcode.nvim
and you still get only one record then i can't really think of any solution right now. I will try to find one and let you know if i do find it
I don't understand why but the questions managed to get updated today so I guess the problems got solved.
I'm getting this error when I try to run leetcode.nvim.
Here is my setup.