♻️ 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 {
|
return {
|
||||||
"declancm/cinnamon.nvim",
|
"declancm/cinnamon.nvim",
|
||||||
event = "VeryLazy",
|
event = "VeryLazy",
|
||||||
opts = {
|
config = function()
|
||||||
default_keymaps = true,
|
require("cinnamon").setup({
|
||||||
extra_keymaps = false,
|
keymaps = { extra = true },
|
||||||
extended_keymaps = false,
|
options = { delay = 5 },
|
||||||
default_delay = 2,
|
})
|
||||||
},
|
|
||||||
|
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