Closed cdmill closed 5 months ago
I got the very same error after update today.
Failed to run `config` for neoscroll.nvim
.../share/nvim/lazy/neoscroll.nvim/lua/neoscroll/config.lua:17: bad argument #1 to 'pairs' (table expected, got nil)
Then, I just passed the mapping
options (something to reinitialize on setup
), it worked.
{
"karb94/neoscroll.nvim",
event = { "BufReadPost", "BufNewFile" },
config = function()
local opts = {
mappings = {
"<C-u>",
"<C-d>",
},
}
require("neoscroll").setup(opts)
end,
}
same here
Some new interfaces have bugs in duration
calculation. For example: https://github.com/karb94/neoscroll.nvim/blob/88e63a89fee0f6112f0477a5709a460c45e5dee9/lua/neoscroll/init.lua#L242
Update: these bugs don't affect many users because they remove all default mappings, and set up mappings with require('neoscroll.config').set_mappings
, which calls the bug-free <cmd>lua require('neoscroll').
interfaces.
Sorry about this. I'll fix it in a few hours.
Let me know if the last commit didn't fix all of your issues.
After updating to the latest commit I'm running into a few issues.
My previous config (below) now has errors because line 17 in
neoscroll/config.lua
is expecting a table but is gettingnil
. The docs still userequire("neoscroll").setup()
in the quickstart section, so I don't think this is intended. This error will obviously go away if passing an empty table or any custom opts.If the error is ignored then no scrolling animations happen. If i pass a table (empty or with custom opts) and then for example use
zb
I get the following error happening inneoscroll/init.lua
line 298 "attempting to perform arithmetic on local 'half_win_duration' ( a table value)".