{ helpers, ... }: { plugins = { neoscroll = { enable = true; settings = { easing_function = "sine"; }; }; }; # https://github.com/karb94/neoscroll.nvim extraConfigLua = '' neoscroll = require('neoscroll') local keymap = { [""] = function() neoscroll.ctrl_u({ duration = 80 }) end; [""] = function() neoscroll.ctrl_d({ duration = 80 }) end; [""] = function() neoscroll.ctrl_b({ duration = 80 }) end; [""] = function() neoscroll.ctrl_f({ duration = 80 }) end; [""] = function() neoscroll.scroll(-0.1, { move_cursor=false; duration = 40 }) end; [""] = function() neoscroll.scroll(0.1, { move_cursor=false; duration = 40 }) end; ["zt"] = function() neoscroll.zt({ half_win_duration = 80 }) end; ["zz"] = function() neoscroll.zz({ half_win_duration = 80 }) end; ["zb"] = function() neoscroll.zb({ half_win_duration = 80 }) end; } local modes = { 'n', 'v', 'x' } for key, func in pairs(keymap) do vim.keymap.set(modes, key, func) end ''; }