I'm trying to integrate this plugin with Telescope.nvim to achieve smooth scrolling behavior. In my attempt, I used the following code, but it did not work as expected:
specs = {
{
"nvim-telescope/telescope.nvim",
optional = true,
opts = function(_, opts)
local cinnamon = require "cinnamon"
local maps = opts.defaults.mappings
local action_i_cr = maps.i["<CR>"]
maps.i["<CR>"] = function(prompt_bufnr)
cinnamon.scroll(function()
action_i_cr(prompt_bufnr)
vim.cmd "normal! zz"
end)
end
end
}
}
I noticed that if I write the code like this, the Telescope jump itself doesn't scroll smoothly, but the subsequent cinnamon.scroll("zz") works as expected:
maps.i["<CR>"] = function(prompt_bufnr)
action_i_cr(prompt_bufnr)
cinnamon.scroll("zz")
end
I wonder if it is possible to integrate with Telescope.nvim in a way that includes the scrolling during the jump?
I'm trying to integrate this plugin with Telescope.nvim to achieve smooth scrolling behavior. In my attempt, I used the following code, but it did not work as expected:
I noticed that if I write the code like this, the Telescope jump itself doesn't scroll smoothly, but the subsequent
cinnamon.scroll("zz")works as expected:I wonder if it is possible to integrate with Telescope.nvim in a way that includes the scrolling during the jump?