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
|
-- Statusbar
local status_ok, lualine = pcall(require, "lualine")
if not status_ok then
return
end
local hide_in_width = function()
return vim.fn.winwidth(0) > 80
end
local diagnostics = {
"diagnostics",
sources = { "nvim_diagnostic" },
sections = { "error", "warn" },
symbols = { error = " ", warn = " " },
colored = false,
update_in_insert = false,
always_visible = true,
}
local diff = {
"diff",
colored = false,
symbols = { added = " ", modified = " ", removed = " " }, -- changes diff symbols
cond = hide_in_width,
}
local branch = {
"b:gitsigns_head",
icon = " ",
cond = hide_in_width,
}
local location = { "location", cond = hide_in_width }
local filetype = { "filetype", cond = hide_in_width, color = {} }
lualine.setup({
options = {
icons_enabled = true,
theme = "auto",
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
disabled_filetypes = { "dashboard", "NvimTree", "Outline" },
always_divide_middle = true,
},
sections = {
lualine_a = { "mode" },
lualine_b = { branch, "filename" },
lualine_c = { diff },
lualine_x = { diagnostics, filetype },
lualine_y = {},
lualine_z = { "location", "progress", "encoding" },
},
inactive_sections = {
lualine_a = { "mode" },
lualine_b = { "filename" },
lualine_c = {},
lualine_x = {},
lualine_y = {},
lualine_z = { "location", "progress", "encoding" },
},
tabline = {},
extensions = {},
})
|