-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathsimple.lua
More file actions
68 lines (64 loc) · 1.76 KB
/
simple.lua
File metadata and controls
68 lines (64 loc) · 1.76 KB
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
local windline = require('windline')
local b_components = require('windline.components.basic')
local state = _G.WindLine.state
local hl_list = {
Black = { 'white', 'black' },
White = { 'black', 'white' },
Normal = { 'NormalFg', 'NormalBg' },
Inactive = { 'InactiveFg', 'InactiveBg' },
Active = { 'ActiveFg', 'ActiveBg' },
}
local basic = {}
basic.divider = { b_components.divider, hl_list.Normal }
local colors_mode = {
Normal = { 'black', 'magenta' },
Insert = { 'black', 'green' },
Visual = { 'black', 'yellow' },
Replace = { 'black', 'blue_light' },
Command = { 'black', 'red' },
}
basic.vi_mode = {
name = 'vi_mode',
hl_colors = colors_mode,
text = function()
return { { ' ' .. state.mode[1] .. ' ', state.mode[2] } }
end,
}
basic.right = {
hl_colors = colors_mode,
text = function()
return {
{ ' ', state.mode[2] },
{ b_components.progress },
{ ' ' },
{ b_components.line_col },
}
end,
}
local default = {
filetypes = { 'default' },
active = {
basic.vi_mode,
{ ' ', { 'white', 'NormalBg' } },
{ b_components.cache_file_name('[No Name]', 'unique') },
basic.divider,
{ b_components.cache_file_type({ icon = true }), '' },
{ ' ' },
{ b_components.file_format({ icon = true }), { 'white', 'NormalBg' } },
{ ' ' },
{ b_components.file_encoding(), '' },
{ ' ' },
basic.right,
},
inactive = {
{ b_components.full_file_name, hl_list.Inactive },
basic.divider,
{ b_components.line_col, hl_list.Inactive },
{ b_components.progress, hl_list.Inactive },
},
}
windline.setup({
statuslines = {
default,
},
})