♻️ refactor(nvim): smooth-scrolling extra
This commit is contained in:
parent
67e318c820
commit
dd62c1c26e
1 changed files with 21 additions and 6 deletions
|
@ -1,10 +1,25 @@
|
|||
return {
|
||||
"declancm/cinnamon.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
default_keymaps = true,
|
||||
extra_keymaps = false,
|
||||
extended_keymaps = false,
|
||||
default_delay = 2,
|
||||
},
|
||||
config = function()
|
||||
require("cinnamon").setup({
|
||||
keymaps = { extra = true },
|
||||
options = { delay = 5 },
|
||||
})
|
||||
|
||||
local keymaps = {
|
||||
["<C-u>"] = "<C-u>zz",
|
||||
["<C-d>"] = "<C-d>zz",
|
||||
["n"] = "nzzzv",
|
||||
["N"] = "Nzzzv",
|
||||
}
|
||||
|
||||
local scroll = require("cinnamon").scroll
|
||||
|
||||
for key, value in pairs(keymaps) do
|
||||
vim.keymap.set("n", key, function()
|
||||
scroll(value)
|
||||
end)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue