-
Notifications
You must be signed in to change notification settings - Fork 23
/
vim-options.lua
81 lines (70 loc) · 1.13 KB
/
vim-options.lua
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
68
69
70
71
72
73
74
75
76
77
78
79
80
local M = {}
M.number = function()
if vim.o.number then
return '[x]'
else
return '[ ]'
end
end
M.nu = M.number
M.relativenumber = function()
if vim.o.relativenumber then
return '[x]'
else
return '[ ]'
end
end
M.rnu = M.relativenumber
M.virtualedit = function()
if vim.tbl_contains(vim.opt.virtualedit:get(), 'all') then
return '[x]'
else
return '[ ]'
end
end
M.ve = M.virtualedit
M.list = function()
if vim.o.list then
return '[x]'
else
return '[ ]'
end
end
M.spell = function()
if vim.o.spell then
return '[x]'
else
return '[ ]'
end
end
M.wrap = function()
if vim.o.wrap then
return '[x]'
else
return '[ ]'
end
end
M.cursorline = function()
if vim.o.cursorline then
return '[x]'
else
return '[ ]'
end
end
M.cul = M.cursorline
M.cursorcolumn = function()
if vim.o.cursorcolumn then
return '[x]'
else
return '[ ]'
end
end
M.cuc = M.cursorcolumn
M.cux = function()
if vim.o.cursorline and vim.o.cursorcolumn then
return '[x]'
else
return '[ ]'
end
end
return M