kickstart.nvim/lua/config/options.lua

67 lines
1.5 KiB
Lua

-- Options configuration
-- See `:help vim.o` and `:help option-list`
-- Set leader key (must happen before plugins are loaded)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Set to true if you have a Nerd Font installed
vim.g.have_nerd_font = true
-- Line numbers
vim.o.number = true
vim.o.relativenumber = true
-- Enable mouse mode
vim.o.mouse = 'a'
-- Don't show mode (already in status line)
vim.o.showmode = false
-- Sync clipboard between OS and Neovim
vim.schedule(function()
vim.o.clipboard = 'unnamedplus'
end)
-- Enable break indent
vim.o.breakindent = true
-- Save undo history
vim.o.undofile = true
-- Case-insensitive searching UNLESS \C or capital letters in search term
vim.o.ignorecase = true
vim.o.smartcase = true
-- Keep signcolumn on by default
vim.o.signcolumn = 'yes'
-- Decrease update time
vim.o.updatetime = 250
-- Decrease mapped sequence wait time
vim.o.timeoutlen = 300
-- Configure how new splits should be opened
vim.o.splitright = true
vim.o.splitbelow = true
-- Sets how neovim will display certain whitespace characters
vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
-- Preview substitutions live, as you type
vim.o.inccommand = 'split'
-- Show which line your cursor is on
vim.o.cursorline = true
-- Minimal number of screen lines to keep above and below the cursor
vim.o.scrolloff = 10
-- Raise dialog for unsaved changes instead of failing
vim.o.confirm = true
-- Auto-read files changed outside of Neovim
vim.opt.autoread = true