scrolloff needs to be set before scrolleof initialises
This commit is contained in:
8
init.lua
8
init.lua
@@ -1,6 +1,10 @@
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = ","
|
||||
|
||||
-- Scrolloff
|
||||
local scrolloff = math.floor(vim.o.lines / 2) - 3
|
||||
vim.opt.scrolloff = scrolloff
|
||||
|
||||
require("plugins.init")
|
||||
require("config.autocmd")
|
||||
require("config.binds")
|
||||
@@ -39,10 +43,6 @@ vim.opt.incsearch = true
|
||||
-- Nowrap
|
||||
vim.opt.wrap = false
|
||||
|
||||
-- Scrolloff
|
||||
local scrolloff = math.floor(vim.o.lines / 2) - 3
|
||||
vim.opt.scrolloff = scrolloff
|
||||
|
||||
-- Indent
|
||||
vim.o.autoindent = true
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@ require("auto-save").setup({
|
||||
require("remember").setup({})
|
||||
|
||||
-- enable scrolleof
|
||||
-- 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" },
|
||||
-- })
|
||||
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" },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user