nvim-config-kickstart/lua/general-options.lua

67 lines
1.5 KiB
Lua
Raw Normal View History

-- See `:help vim.o`
-- NOTE: You can change these options as you wish!
-- Set highlight on search
2024-02-15 10:39:13 +00:00
vim.o.hlsearch = false
-- Make line numbers default
vim.wo.number = true
-- Enable mouse mode
vim.o.mouse = 'a'
-- Sync clipboard between OS and Neovim.
-- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'`
2023-12-24 17:03:27 +00:00
-- vim.o.clipboard = 'unnamedplus'
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Case-insensitive searching UNLESS \C or capital in search
vim.o.ignorecase = true
vim.o.smartcase = true
-- Keep signcolumn on by default
vim.wo.signcolumn = 'yes'
-- Decrease update time
vim.o.updatetime = 250
vim.o.timeoutlen = 300
-- Set completeopt to have a better completion experience
vim.o.completeopt = 'menuone,noselect'
-- NOTE: You should make sure your terminal supports this
vim.o.termguicolors = true
-- Light colorscheme
vim.o.background = "light"
2023-12-24 10:15:52 +00:00
-- general purpose options
local set_true = { 'title', 'relativenumber', 'ruler', 'modeline',
2023-12-25 13:29:10 +00:00
'autoread', 'cursorline', 'cursorcolumn',
'incsearch',
'showcmd', 'showmatch', 'lazyredraw', 'linebreak', 'wrap',
'wildmenu', 'wildignorecase', 'showfulltag', }
2023-12-24 10:15:52 +00:00
vim.o.colorcolumn = '+1'
2023-12-25 13:29:10 +00:00
for _, o in ipairs(set_true) do
2023-12-24 10:15:52 +00:00
vim.o[o] = true
end
2023-12-24 18:17:20 +00:00
-- folds
2023-12-25 13:29:10 +00:00
vim.g.ip_skipfold = true
2023-12-24 10:15:52 +00:00
-- window management
vim.o.tw = 80
vim.o.winwidth = 88
vim.o.scrolloff = 10
vim.cmd "set formatoptions-=t"
-- Make some typographic chars visible
vim.opt.listchars:append({nbsp = "·", trail = "¤", eol = ''})
vim.o.list = true