init
This commit is contained in:
commit
1e2ca5a6fc
71 changed files with 3330 additions and 0 deletions
30
config/plugins/neoscroll.nix
Normal file
30
config/plugins/neoscroll.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ helpers, ... }:
|
||||
{
|
||||
plugins = {
|
||||
neoscroll = {
|
||||
enable = true;
|
||||
settings = {
|
||||
easing_function = "sine";
|
||||
};
|
||||
};
|
||||
};
|
||||
# https://github.com/karb94/neoscroll.nvim
|
||||
extraConfigLua = ''
|
||||
neoscroll = require('neoscroll')
|
||||
local keymap = {
|
||||
["<C-u>"] = function() neoscroll.ctrl_u({ duration = 80 }) end;
|
||||
["<C-d>"] = function() neoscroll.ctrl_d({ duration = 80 }) end;
|
||||
["<C-b>"] = function() neoscroll.ctrl_b({ duration = 80 }) end;
|
||||
["<C-f>"] = function() neoscroll.ctrl_f({ duration = 80 }) end;
|
||||
["<C-y>"] = function() neoscroll.scroll(-0.1, { move_cursor=false; duration = 40 }) end;
|
||||
["<C-e>"] = 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
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue