50 lines
1.7 KiB
Lua
50 lines
1.7 KiB
Lua
local opt = vim.opt
|
|
|
|
-- Columns and gutters
|
|
opt.colorcolumn = "80,120" -- Highlight columns 80, 120
|
|
opt.number = true -- Line numbers in the gutter
|
|
opt.relativenumber = true -- Relative line numbers in the gutter
|
|
opt.signcolumn = "yes:1" -- Sign column in the gutter always visible
|
|
|
|
-- Indentation
|
|
opt.autoindent = true -- Enable auto-indentation
|
|
opt.breakindent = true -- ?
|
|
opt.expandtab = true -- Default to spaces instead of tabs
|
|
opt.shiftround = true -- Round indent to multiple of shift-width
|
|
opt.shiftwidth = 4 -- Number of spaces when auto-indenting
|
|
opt.softtabstop = 4 -- Number of spaces for a tab when editing
|
|
opt.tabstop = 4 -- Number of spaces for a tab
|
|
|
|
-- Display and adornments
|
|
opt.cursorline = true -- Highlight current line
|
|
opt.guifont = "Inconsolata Patched G:h12"
|
|
opt.list = true -- Show whitespace characters
|
|
opt.listchars = { tab = "» ", trail = "○", nbsp = "␣", lead = "•" }
|
|
opt.scrolloff = 3 -- Show 3 lines above and below cursor
|
|
opt.showmode = false -- Don't show the mode since it's in our statusline
|
|
opt.termguicolors = true -- Use true terminal colors
|
|
opt.virtualedit = "block"
|
|
opt.winborder = "rounded" -- Rounded borders for windows
|
|
|
|
-- Behavior
|
|
opt.confirm = true
|
|
opt.ignorecase = true -- Ignore case in search and commands
|
|
opt.inccommand = "split" -- Preview substitutions live
|
|
opt.mouse = "a" -- Turn on mouse support
|
|
opt.smartcase = true -- ?
|
|
opt.splitbelow = true
|
|
opt.splitright = true
|
|
opt.timeoutlen = 1000 -- Command timeout length
|
|
opt.undofile = true
|
|
opt.updatetime = 250 -- ?
|
|
|
|
-- Clipboard
|
|
-- Sync clipboard between OS and Neovim.
|
|
vim.schedule(function()
|
|
vim.opt.clipboard = "unnamedplus"
|
|
end)
|
|
|
|
-- Features
|
|
vim.cmd.filetype("plugin indent on")
|
|
vim.g.have_nerd_font = true
|