mirror of
https://github.com/macocianradu/setup.git
synced 2026-07-16 10:38:46 +00:00
added smooth scroll
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
local neoscroll = require('neoscroll')
|
||||||
|
neoscroll.setup({
|
||||||
|
easing = 'quadratic',
|
||||||
|
})
|
||||||
|
|
||||||
|
local keymap = {
|
||||||
|
['<C-u>'] = function() neoscroll.ctrl_u({ duration = 125 }) end,
|
||||||
|
['<C-d>'] = function() neoscroll.ctrl_d({ duration = 125 }) end,
|
||||||
|
['<C-b>'] = function() neoscroll.ctrl_b({ duration = 200 }) end,
|
||||||
|
['<C-f>'] = function() neoscroll.ctrl_f({ duration = 200 }) end,
|
||||||
|
['<C-y>'] = function() neoscroll.scroll(-0.1, { move_cursor = false, duration = 60 }) end,
|
||||||
|
['<C-e>'] = function() neoscroll.scroll(0.1, { move_cursor = false, duration = 60 }) end,
|
||||||
|
['zt'] = function() neoscroll.zt({ half_win_duration = 125 }) end,
|
||||||
|
['zz'] = function() neoscroll.zz({ half_win_duration = 125 }) end,
|
||||||
|
['zb'] = function() neoscroll.zb({ half_win_duration = 125 }) end,
|
||||||
|
}
|
||||||
|
for key, func in pairs(keymap) do
|
||||||
|
vim.keymap.set({ 'n', 'v', 'x' }, key, func)
|
||||||
|
end
|
||||||
@@ -89,6 +89,7 @@ require("lazy").setup({
|
|||||||
},
|
},
|
||||||
'tpope/vim-surround',
|
'tpope/vim-surround',
|
||||||
'sphamba/smear-cursor.nvim',
|
'sphamba/smear-cursor.nvim',
|
||||||
|
'karb94/neoscroll.nvim',
|
||||||
{
|
{
|
||||||
"folke/persistence.nvim",
|
"folke/persistence.nvim",
|
||||||
event = "BufReadPre",
|
event = "BufReadPre",
|
||||||
|
|||||||
Reference in New Issue
Block a user