lua/josean/core/options.lua (1467B)
1 local opt = vim.opt -- for conciseness
2
3 -- line numbers
4 opt.relativenumber = true -- show relative line numbers
5 opt.number = true -- shows absolute line number on cursor line (when relative number is on)
6
7 -- tabs & indentation
8 opt.tabstop = 2 -- 2 spaces for tabs (prettier default)
9 opt.shiftwidth = 2 -- 2 spaces for indent width
10 opt.expandtab = true -- expand tab to spaces
11 opt.autoindent = true -- copy indent from current line when starting new one
12
13 -- line wrapping
14 opt.wrap = false -- disable line wrapping
15
16 -- search settings
17 opt.ignorecase = true -- ignore case when searching
18 opt.smartcase = true -- if you include mixed case in your search, assumes you want case-sensitive
19
20 -- cursor line
21 opt.cursorline = true -- highlight the current cursor line
22
23 -- appearance
24
25 -- turn on termguicolors for nightfly colorscheme to work
26 -- (have to use iterm2 or any other true color terminal)
27 opt.termguicolors = true
28 opt.background = "dark" -- colorschemes that can be light or dark will be made dark
29 opt.signcolumn = "yes" -- show sign column so that text doesn't shift
30
31 -- backspace
32 opt.backspace = "indent,eol,start" -- allow backspace on indent, end of line or insert mode start position
33
34 -- clipboard
35 opt.clipboard:append("unnamedplus") -- use system clipboard as default register
36
37 -- split windows
38 opt.splitright = true -- split vertical window to the right
39 opt.splitbelow = true -- split horizontal window to the bottom
40
41 -- turn off swapfile
42 opt.swapfile = false