config leetcode nvim and login
紀錄坑
config in lazy vim
- plugin/init.lua
{
"kawre/leetcode.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim"
},
lazy = false;
opts = {}
}
- ./init.lua
require("leetcode").setup({
lang = "cpp", -- 你可以改成 "python" 或其他語言
storage = { home = vim.fn.expand("$HOME") .. "/.leetcode" }
})
login
使用F12查看Response Header中的SetCookie
- 注意
- 因為Cookie過長所以會切成兩段,以Set-Cookie進行切分
- 內容值要看清楚以下為示範內容
csrftoken=[cookie value];LEETCODE_SESSION=[leetcode_session value]; Domain=.leetcode.com; expires=Wed, 05 Mar 2025 16:38:03 GMT; HttpOnly; Max-Age=1209600; Path=/; SameSite=Lax;