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
81
82
|
return {
"nvim-lualine/lualine.nvim",
dependencies = {
"nvim-tree/nvim-web-devicons",
},
event = { "BufReadPre", "BufNewFile" },
config = function()
-- See :help statusline for more information
local filepath = "%=%m %f"
-- Map to shorten mode names
local modes = {
["NORMAL"] = "N",
["INSERT"] = "I",
["VISUAL"] = "V",
["V-LINE"] = "VL",
["V-BLOCK"] = "VB",
["REPLACE"] = "R",
["COMMAND"] = "C",
["EX"] = "EX",
["MORE"] = "M",
["CONFIRM"] = "CF",
["TERMINAL"] = "T",
}
require("lualine").setup({
options = {
theme = "auto",
icons_enabled = true,
section_separators = { left = "", right = "" },
component_separators = { left = "", right = "" },
globalstatus = true,
ignore_focus = {},
always_divide_middle = false,
refresh = {
statusline = 500,
tabline = 500,
winbar = 0,
},
},
sections = {
lualine_a = {
{
"mode",
fmt = function(str)
return modes[str]
end,
},
},
lualine_b = { "branch" },
lualine_c = {},
lualine_x = { filepath },
lualine_y = { "filetype" },
lualine_z = { "location" },
},
inactive_sections = {
lualine_a = { filepath },
lualine_b = {},
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location" },
},
tabline = {
lualine_a = { "getcwd" },
lualine_b = { "diff" },
lualine_c = { "orgmode.statusline()" },
lualine_x = {},
lualine_y = {},
lualine_z = { "tabs" },
},
winbar = {},
extensions = { "fugitive", "quickfix" },
})
-- Remove duplicate information that clutters the bottom of the screen
-- "-- INSERT --" on the left:
vim.opt.showmode = false
-- "100%" linenr/col on the right:
vim.opt.ruler = false
-- commands on the right:
vim.opt.showcmd = false
end,
}
|