Closed Dusker233 closed 5 months ago
Can you try Leet cookie delete
?
It should work now without deleting the cookie. Can you confirm?
No, cannot work rn.
Sign in (By Cookie)
-> session expiredLeet cookie delete
Sign in (By Cookie)
-> session expiredSign in (By Cookie)
-> session expiredoh i fixed. previously i modified cn
in ~/nvim/lua/plugins/leetcode.lua
, now i modified cn
in ~/nvim-data/lazy/leetcode.nvim/lua/leetcode/config/template.lua
, now it works.
Can I see your configuration file for leetcode.nvim
? You only modified the source code, so when I update this plugin the template.lua
will get overridden.
just like the pic above, i only modified cn->enabled=true
, and nothing else.
here's my template.lua
: https://paste.ubuntu.com/p/75vgSCpCh2/
here's my leetcode.lua
: https://paste.ubuntu.com/p/6rykmm3qwH/
opts = {
---@type string
arg = "leetcode.nvim",
---@type lc.lang
lang = "cpp",
cn = { -- leetcode.cn
enabled = false, ---@type boolean
translator = true, ---@type boolean
translate_problems = true, ---@type boolean
},
---@type string
directory = vim.fn.stdpath("data") .. "/leetcode/",
---@type boolean
logging = true,
injector = {}, ---@type table<lc.lang, lc.inject>
cache = {
update_interval = 60 * 60 * 24 * 7, ---@type integer 7 days
},
console = {
open_on_runcode = true, ---@type boolean
dir = "row", ---@type lc.direction
size = { ---@type lc.size
width = "90%",
height = "75%",
},
result = {
size = "60%", ---@type lc.size
},
testcase = {
virt_text = true, ---@type boolean
size = "40%", ---@type lc.size
},
},
description = {
position = "left", ---@type lc.position
width = "40%", ---@type lc.size
show_stats = true, ---@type boolean
},
hooks = {
---@type fun()[]
LeetEnter = {},
---@type fun(question: lc.ui.Question)[]
LeetQuestionNew = {},
},
keys = {
toggle = { "q", "<Esc>" }, ---@type string|string[]
confirm = { "<CR>" }, ---@type string|string[]
reset_testcases = "r", ---@type string
use_testcase = "U", ---@type string
focus_testcases = "H", ---@type string
focus_result = "L", ---@type string
},
---@type boolean
image_support = false, -- setting this to `true` will disable question description wrap
},
opts don't apply because you have them nested in an additional table. Replace your opts with the ones i sent
and set cn.enabled to true
yep it works. thx a lot!
Hello there. I'm always getting this error, and i have already set
cn
as enabled.Kinda weird and i don't know what to do rn...