blob: be614e1b528659458bc13179041e3e902293cb06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
-- 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 <Esc>
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
|