Open
Description
Issue Description
When fetching problem lists with LeetCode.nvim in NixVim, the plugin fails with a type error in the spinner module. The error occurs when trying to index a field named 'noti' which is unexpectedly a number instead of the expected table/object type.
Error Message
E5108: Error executing lua: ...lugin-leetcode.nvim/lua/leetcode/logger/spinner/init.lua:76: attempt to index field 'noti' (a number value)
Stack Trace
stack traceback:
...lugin-leetcode.nvim/lua/leetcode/logger/spinner/init.lua:76: in function 'set'
...lugin-leetcode.nvim/lua/leetcode/logger/spinner/init.lua:117: in function 'stop'
...rt/vimplugin-leetcode.nvim/lua/leetcode/api/problems.lua:90: in function 'all'
...mplugin-leetcode.nvim/lua/leetcode/cache/problemlist.lua:67: in function 'read'
...mplugin-leetcode.nvim/lua/leetcode/cache/problemlist.lua:32: in function 'get'
...rt/vimplugin-leetcode.nvim/lua/leetcode/command/init.lua:28: in function <...rt/vimplugin-leetcode.nvim/lua/leetcode/command/init.lua:25>
Environment
- Using NixVim
- LeetCode.nvim version: rev = "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951"
- Plenary.nvim version: v0.1.4
Configuration
require("leetcode").setup({
lang = "rust",
branch = "dev",
storage = {
home = vim.fn.stdpath("data") .. "/leetcode",
cache = vim.fn.stdpath("cache") .. "/leetcode",
},
plugins = {
non_standalone = true,
}
})
Reproduction Steps
- Set up NixVim with LeetCode.nvim plugin as configured above
- Attempt to fetch the problem list in Neovim
- Error occurs during the fetch operation
Possible Cause
There appears to be a type mismatch in the spinner module where the code is trying to access a table property ('noti') but is encountering a number value instead. This could be due to:
- A version compatibility issue between the plugin and dependencies
- NixVim-specific environment differences
- A bug in the notification/spinner handling logic of the plugin
Metadata
Metadata
Assignees
Labels
No labels