73 lines
2.0 KiB
Lua
73 lines
2.0 KiB
Lua
-- Set <space> as the leader key
|
|
vim.g.mapleader = ' '
|
|
vim.g.maplocalleader = ' '
|
|
|
|
-- autoindent if possible when entering a new line in a block
|
|
vim.opt.autowriteall = false
|
|
vim.opt.smartindent = true
|
|
-- Make line numbers default
|
|
vim.opt.number = true
|
|
vim.opt.relativenumber = true
|
|
|
|
-- Enable mouse mode, can be useful for resizing splits for example!
|
|
vim.opt.mouse = 'a'
|
|
|
|
-- Don't show the mode, since it's already in the status line
|
|
vim.opt.showmode = false
|
|
|
|
-- Don't wrap long words
|
|
vim.opt.wrap = false
|
|
-- Sync clipboard between OS and Neovim.
|
|
vim.schedule(function()
|
|
vim.opt.clipboard = 'unnamedplus'
|
|
end)
|
|
|
|
-- Enable break indent
|
|
vim.opt.breakindent = true
|
|
|
|
-- Save undo history
|
|
vim.opt.undofile = true
|
|
|
|
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
|
|
vim.opt.ignorecase = true
|
|
vim.opt.smartcase = true
|
|
|
|
-- Keep signcolumn on by default
|
|
vim.opt.signcolumn = 'yes'
|
|
|
|
-- Decrease update time
|
|
vim.opt.updatetime = 250
|
|
|
|
-- Decrease mapped sequence wait time
|
|
vim.opt.timeoutlen = 300
|
|
|
|
-- Configure how new splits should be opened
|
|
vim.opt.splitright = true
|
|
vim.opt.splitbelow = true
|
|
|
|
-- Sets how neovim will display certain whitespace characters in the editor.
|
|
-- See `:help 'list'`
|
|
-- and `:help 'listchars'`
|
|
vim.opt.list = true
|
|
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' }
|
|
|
|
-- Preview substitutions live, as you type!
|
|
vim.opt.inccommand = 'split'
|
|
|
|
-- Show which line your cursor is on
|
|
vim.opt.cursorline = true
|
|
|
|
-- Minimal number of screen lines to keep above and below the cursor.
|
|
vim.opt.scrolloff = 10
|
|
|
|
-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`),
|
|
-- instead raise a dialog asking if you wish to save the current file(s)
|
|
-- See `:help 'confirm'`
|
|
vim.opt.confirm = true
|
|
|
|
vim.opt.guicursor = {
|
|
'n-v-c:block-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100',
|
|
'i-ci:ver25-Cursor/lCursor-blinkwait1000-blinkon100-blinkoff100',
|
|
'r:hor50-Cursor/lCursor-blinkwait100-blinkon100-blinkoff100',
|
|
}
|