(nvim) increase scrolloff line number

This commit is contained in:
jc 2024-08-24 13:52:32 -04:00
commit 10d89aa2b6

View file

@ -1,7 +1,7 @@
vim.g.mapleader = " " vim.g.mapleader = " "
vim.g.maplocalleader = " " vim.g.maplocalleader = " "
vim.opt.number = true -- show line number vim.opt.number = true -- show line number
vim.opt.relativenumber = true -- juicy relativity vim.opt.relativenumber = true -- juicy relativity
vim.opt.autoindent = true vim.opt.autoindent = true
@ -18,7 +18,7 @@ vim.opt.wrap = false -- bad, stay away from me!
vim.opt.hlsearch = false vim.opt.hlsearch = false
vim.opt.incsearch = true -- highlight search pattern as you type vim.opt.incsearch = true -- highlight search pattern as you type
vim.opt.scrolloff = 8 -- give me some personal space vim.opt.scrolloff = 12 -- give me some personal space
vim.opt.updatetime = 50 vim.opt.updatetime = 50
@ -45,11 +45,11 @@ vim.opt.undofile = true
-- highlight on yank -- highlight on yank
local highligh_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true }) local highligh_group = vim.api.nvim_create_augroup("YankHighlight", { clear = true })
vim.api.nvim_create_autocmd("TextYankPost", { vim.api.nvim_create_autocmd("TextYankPost", {
callback = function() callback = function()
vim.highlight.on_yank() vim.highlight.on_yank()
end, end,
group = highligh_group, group = highligh_group,
pattern = "*", pattern = "*",
}) })
vim.opt.completeopt = "menu,menuone,noselect" vim.opt.completeopt = "menu,menuone,noselect"