From f5fb5c83d808fe73c512179de448f8e019837cbd Mon Sep 17 00:00:00 2001 From: voidarc Date: Thu, 30 Apr 2026 10:03:37 +0100 Subject: [PATCH] fixed scrolloff, scrolleof not working --- init.lua | 2 +- lua/plugins/utils/convenience.lua | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index bcd55d8..3f6ccfc 100644 --- a/init.lua +++ b/init.lua @@ -40,7 +40,7 @@ vim.opt.incsearch = true vim.opt.wrap = false -- Scrolloff -vim.opt.scrolloff = math.floor(vim.o.lines / 2) - 3 +vim.wo.scrolloff = math.floor(vim.o.lines / 2) - 3 -- Indent vim.o.autoindent = true diff --git a/lua/plugins/utils/convenience.lua b/lua/plugins/utils/convenience.lua index 8ebffec..773ad4b 100644 --- a/lua/plugins/utils/convenience.lua +++ b/lua/plugins/utils/convenience.lua @@ -20,4 +20,16 @@ require("auto-save").setup({ require("remember").setup({}) -- enable scrolleof -require("scrollEOF").setup() +require("scrollEOF").setup({ + -- The pattern used for the internal autocmd to determine + -- where to run scrollEOF. See https://neovim.io/doc/user/autocmd.html#autocmd-pattern + pattern = "*", + -- Whether or not scrollEOF should be enabled in insert mode + insert_mode = false, + -- Whether or not scrollEOF should be enabled in floating windows + floating = true, + -- List of filetypes to disable scrollEOF for. + disabled_filetypes = { "terminal" }, + -- List of modes to disable scrollEOF for. see https://neovim.io/doc/user/builtin.html#mode() + disabled_modes = { "t", "nt" }, +})