aboutsummaryrefslogtreecommitdiffstats
path: root/neovim/.config/nvim/lua/config/options.lua
diff options
context:
space:
mode:
Diffstat (limited to 'neovim/.config/nvim/lua/config/options.lua')
-rw-r--r--neovim/.config/nvim/lua/config/options.lua36
1 files changed, 36 insertions, 0 deletions
diff --git a/neovim/.config/nvim/lua/config/options.lua b/neovim/.config/nvim/lua/config/options.lua
new file mode 100644
index 0000000..be614e1
--- /dev/null
+++ b/neovim/.config/nvim/lua/config/options.lua
@@ -0,0 +1,36 @@
1-- Ported from vim/.vim/vimrc's "DEFAULT VIM SETTINGS" block. `syntax on` and
2-- `filetype plugin indent on` are intentionally omitted: both are Neovim
3-- defaults (see `:help nvim-defaults`).
4
5local opt = vim.opt
6
7opt.number = true
8opt.relativenumber = true
9opt.list = true
10opt.modeline = true
11opt.background = "dark"
12opt.foldmethod = "indent"
13opt.listchars = { trail = "·", tab = "▸ ", eol = "¬" }
14opt.scrolloff = 1
15opt.backspace = { "indent", "eol", "start" }
16opt.cursorline = true
17opt.hidden = true -- already Neovim's default; set explicitly for parity with the vimrc
18opt.wildmenu = true -- already Neovim's default; set explicitly for parity with the vimrc
19
20-- Faster gutter updates (signify) and snappier <Esc>
21opt.updatetime = 100
22opt.ttimeoutlen = 10
23
24-- Persistent undo across sessions
25local undodir = vim.fn.stdpath("data") .. "/undo"
26if vim.fn.isdirectory(undodir) == 0 then
27 vim.fn.mkdir(undodir, "p", "0700")
28end
29opt.undofile = true
30opt.undodir = undodir
31
32-- Search-related things
33opt.hlsearch = true
34opt.incsearch = true
35opt.ignorecase = true
36opt.smartcase = true