summaryrefslogtreecommitdiffstats
path: root/lua/core/opts.lua
blob: f134f70d169ea996aa2c2fd8222684592e13cf56 (plain) (blame)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
-- better ui ------------------------------------------------------------------
vim.notify = require("notify")
o.colorcolumn = { 80 }

-- buffer
o.scrolloff = 5
o.wrap = true -- wraping lines
o.linebreak = true -- fix where line is wraped
o.cursorline = true

-- statusbar
o.laststatus = 3
o.cmdheight = 1
if o.cmdheight == 0 then
  o.showcmdloc = 'statusline'
end
o.showmode = false -- stop vim from showing mode (we have a statusbar)

-- status column
o.signcolumn = 'yes:1' -- show gutter
o.relativenumber = true
o.number = true
o.numberwidth = 2

-- indents + tabs
local tabwidth = 2
o.expandtab = true
o.smarttab = true
o.cindent = true
o.autoindent = true
o.tabstop = tabwidth
o.shiftwidth = tabwidth
o.softtabstop = tabwidth

-- colorscheme
o.termguicolors = true
vim.cmd('colorscheme mellow')

-- better editing -------------------------------------------------------------
o.clipboard = 'unnamedplus' -- system clipboard (on unix like)

-- file saving ----------------------------------------------------------------
o.swapfile = false
o.undofile = true
o.confirm = true

-- searching ------------------------------------------------------------------
o.ignorecase = true
o.smartcase = true
o.wrapscan = true
o.showmatch = true
o.incsearch = true

-- wild menus -----------------------------------------------------------------
o.wildoptions = 'pum'
o.pumblend = 3
o.pumheight = 20

o.wildignorecase = true
o.wildignore = '*.o'

-- netrw ----------------------------------------------------------------------
g.netrw_banner = 1
g.netrw_localcopydircmd = 'cp -r'
g.netrw_winsize = 30
g.netrw_liststyle = 1
g.netrw_preview = 1