♻️ refactor(nvim): smooth-scrolling extra

This commit is contained in:
Sergio Laín 2024-06-26 12:06:34 +02:00
parent 67e318c820
commit dd62c1c26e
No known key found for this signature in database
GPG key ID: 8429B2EE312F8150

View file

@ -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,
}