Skip to content
Discussion options

You must be logged in to vote

It's not possible for snacks to detect that kind of scrolling unfortunately.
As far as snacks is concerned, that zz never happened.

You can configure vim.o.scrolloff = 999 though, or do somthing like the below to just set it for scrolling keymaps:

vim.keymap.set("n", "<C-d>", function()
  vim.wo.scrolloff = 999
  vim.defer_fn(function()
    vim.wo.scrolloff = 8
  end, 500)
  return "<c-d>"
end, { expr = true })

vim.keymap.set("n", "<C-u>", function()
  vim.wo.scrolloff = 999
  vim.defer_fn(function()
    vim.wo.scrolloff = 8
  end, 500)
  return "<c-u>"
end, { expr = true })

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jeffcap1
Comment options

Answer selected by jeffcap1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants