2024-07-06 15:15:37 +02:00
|
|
|
local opt = vim.opt
|
|
|
|
local options = {
|
2024-07-10 22:10:54 +02:00
|
|
|
showmode = false, -- disable the -- STATUS -- line
|
|
|
|
showtabline = 0, -- never show the tabline
|
|
|
|
startofline = true, -- motions like "G" also move to the first char
|
|
|
|
virtualedit = 'block', -- visual-block mode can select beyond end of line
|
|
|
|
showmatch = true, -- when closing a bracket, briefly flash the matching one
|
|
|
|
matchtime = 1, -- duration of that flashing n deci-seconds
|
|
|
|
signcolumn = 'yes:1', -- static width
|
|
|
|
report = 9001, -- disable "x more/fewer lines" messages
|
|
|
|
diffopt = opt.diffopt:append('vertical'), -- diff mode: vertical splits
|
|
|
|
backspace = { 'indent', 'eol', 'start' }, -- backspace through everything in insert mode
|
|
|
|
hidden = true, -- Enable background buffers
|
|
|
|
history = 100, -- Remember N lines in history
|
2024-07-22 01:20:41 +02:00
|
|
|
lazyredraw = false, -- Faster scrolling if enabled, breaks noice
|
2024-07-10 22:10:54 +02:00
|
|
|
synmaxcol = 240, -- Max column for syntax highlight
|
|
|
|
updatetime = 250, -- ms to wait for trigger an event
|
2024-07-06 15:15:37 +02:00
|
|
|
|
2024-07-10 22:10:54 +02:00
|
|
|
-- If 0, move cursor line will not scroll window.
|
|
|
|
-- If 999, cursor line will always be in middle of window.
|
|
|
|
scrolloff = 0,
|
2024-07-06 15:15:37 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
-- iterate over the options table and set the options
|
|
|
|
-- for each key = value pair
|
|
|
|
for key, value in pairs(options) do
|
2024-07-10 22:10:54 +02:00
|
|
|
opt[key] = value
|
2024-07-06 15:15:37 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
-- Don't auto-comment new lines automatically
|
|
|
|
-- that happens when you press enter at the end
|
|
|
|
-- of a comment line, and comments the next line
|
|
|
|
-- That's annoying and we don't want it!
|
|
|
|
-- don't continue comments automagically
|
|
|
|
-- https://neovim.io/doc/user/options.html#'formatoptions'
|
|
|
|
opt.formatoptions:remove('c')
|
|
|
|
opt.formatoptions:remove('r')
|
|
|
|
opt.formatoptions:remove('o')
|