-- Ported from vim/.vim/vimrc's "DEFAULT VIM SETTINGS" block. `syntax on` and -- `filetype plugin indent on` are intentionally omitted: both are Neovim -- defaults (see `:help nvim-defaults`). local opt = vim.opt opt.number = true opt.relativenumber = true opt.list = true opt.modeline = true opt.background = "dark" opt.foldmethod = "indent" opt.listchars = { trail = "·", tab = "▸ ", eol = "¬" } opt.scrolloff = 1 opt.backspace = { "indent", "eol", "start" } opt.cursorline = true opt.hidden = true -- already Neovim's default; set explicitly for parity with the vimrc opt.wildmenu = true -- already Neovim's default; set explicitly for parity with the vimrc -- Faster gutter updates (signify) and snappier opt.updatetime = 100 opt.ttimeoutlen = 10 -- Persistent undo across sessions local undodir = vim.fn.stdpath("data") .. "/undo" if vim.fn.isdirectory(undodir) == 0 then vim.fn.mkdir(undodir, "p", "0700") end opt.undofile = true opt.undodir = undodir -- Search-related things opt.hlsearch = true opt.incsearch = true opt.ignorecase = true opt.smartcase = true