2022-01-21 06:49:49 -05:00
|
|
|
|
local present, feline = pcall(require, "feline")
|
|
|
|
|
if not present then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
local default = {
|
|
|
|
|
colors = require("colors").get(),
|
|
|
|
|
lsp = require "feline.providers.lsp",
|
|
|
|
|
lsp_severity = vim.diagnostic.severity,
|
|
|
|
|
config = require("core.utils").load_config().plugins.options.statusline,
|
|
|
|
|
}
|
2021-07-15 11:43:17 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.icon_styles = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
default = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = " ",
|
|
|
|
|
main_icon = " ",
|
|
|
|
|
vi_mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
},
|
|
|
|
|
arrow = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = "",
|
|
|
|
|
main_icon = " ",
|
|
|
|
|
vi_mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
block = {
|
|
|
|
|
left = " ",
|
|
|
|
|
right = " ",
|
|
|
|
|
main_icon = " ",
|
|
|
|
|
vi_mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
round = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = "",
|
|
|
|
|
main_icon = " ",
|
|
|
|
|
vi_mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
slant = {
|
|
|
|
|
left = " ",
|
|
|
|
|
right = " ",
|
|
|
|
|
main_icon = " ",
|
|
|
|
|
vi_mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
},
|
2021-08-19 02:29:42 -04:00
|
|
|
|
}
|
|
|
|
|
|
2021-10-02 01:07:42 -04:00
|
|
|
|
-- statusline style
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.statusline_style = default.icon_styles[default.config.style]
|
2021-11-17 00:30:57 -05:00
|
|
|
|
|
|
|
|
|
-- show short statusline on small screens
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.shortline = default.config.shortline == false and true
|
2021-08-19 02:29:42 -04:00
|
|
|
|
|
2021-08-26 01:18:13 -04:00
|
|
|
|
-- Initialize the components table
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.components = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
active = {},
|
2021-07-15 11:43:17 -04:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.main_icon = {
|
|
|
|
|
provider = default.statusline_style.main_icon,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.statusline_bg,
|
|
|
|
|
bg = default.colors.nord_blue,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
right_sep = {
|
|
|
|
|
str = default.statusline_style.right,
|
|
|
|
|
hl = {
|
|
|
|
|
fg = default.colors.nord_blue,
|
|
|
|
|
bg = default.colors.lightbg,
|
|
|
|
|
},
|
|
|
|
|
},
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.file_name = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
|
|
|
|
local filename = vim.fn.expand "%:t"
|
|
|
|
|
local extension = vim.fn.expand "%:e"
|
|
|
|
|
local icon = require("nvim-web-devicons").get_icon(filename, extension)
|
|
|
|
|
if icon == nil then
|
|
|
|
|
icon = " "
|
|
|
|
|
return icon
|
|
|
|
|
end
|
|
|
|
|
return " " .. icon .. " " .. filename .. " "
|
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70
|
|
|
|
|
end,
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.white,
|
|
|
|
|
bg = default.colors.lightbg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
right_sep = {
|
|
|
|
|
str = default.statusline_style.right,
|
|
|
|
|
hl = { fg = default.colors.lightbg, bg = default.colors.lightbg2 },
|
|
|
|
|
},
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.dir_name = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
|
|
|
|
local dir_name = vim.fn.fnamemodify(vim.fn.getcwd(), ":t")
|
|
|
|
|
return " " .. dir_name .. " "
|
|
|
|
|
end,
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey_fg2,
|
|
|
|
|
bg = default.colors.lightbg2,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
right_sep = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
str = default.statusline_style.right,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
hi = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.lightbg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.diff = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
add = {
|
|
|
|
|
provider = "git_diff_added",
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey_fg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
change = {
|
|
|
|
|
provider = "git_diff_changed",
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey_fg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
2022-01-21 23:49:32 -05:00
|
|
|
|
icon = " ",
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
remove = {
|
|
|
|
|
provider = "git_diff_removed",
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey_fg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.git_branch = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = "git_branch",
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70
|
|
|
|
|
end,
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey_fg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
icon = " ",
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.diagnostic = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
errors = {
|
|
|
|
|
provider = "diagnostic_errors",
|
|
|
|
|
enabled = function()
|
2022-01-21 06:49:49 -05:00
|
|
|
|
return default.lsp.diagnostics_exist(default.lsp_severity.ERROR)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
end,
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.red },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
warning = {
|
|
|
|
|
provider = "diagnostic_warnings",
|
|
|
|
|
enabled = function()
|
2022-01-21 06:49:49 -05:00
|
|
|
|
return default.lsp.diagnostics_exist(default.lsp_severity.WARN)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.yellow },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
hint = {
|
|
|
|
|
provider = "diagnostic_hints",
|
|
|
|
|
enabled = function()
|
2022-01-21 06:49:49 -05:00
|
|
|
|
return default.lsp.diagnostics_exist(default.lsp_severity.HINT)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.grey_fg2 },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
info = {
|
|
|
|
|
provider = "diagnostic_info",
|
|
|
|
|
enabled = function()
|
2022-01-21 06:49:49 -05:00
|
|
|
|
return default.lsp.diagnostics_exist(default.lsp_severity.INFO)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.green },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.lsp_progress = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
|
|
|
|
local Lsp = vim.lsp.util.get_progress_messages()[1]
|
|
|
|
|
|
|
|
|
|
if Lsp then
|
|
|
|
|
local msg = Lsp.message or ""
|
|
|
|
|
local percentage = Lsp.percentage or 0
|
|
|
|
|
local title = Lsp.title or ""
|
|
|
|
|
local spinners = {
|
|
|
|
|
"",
|
|
|
|
|
"",
|
|
|
|
|
"",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local success_icon = {
|
|
|
|
|
"",
|
|
|
|
|
"",
|
|
|
|
|
"",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
local ms = vim.loop.hrtime() / 1000000
|
|
|
|
|
local frame = math.floor(ms / 120) % #spinners
|
|
|
|
|
|
|
|
|
|
if percentage >= 70 then
|
|
|
|
|
return string.format(" %%<%s %s %s (%s%%%%) ", success_icon[frame + 1], title, msg, percentage)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return ""
|
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 80
|
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.green },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.lsp_icon = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
|
|
|
|
if next(vim.lsp.buf_get_clients()) ~= nil then
|
|
|
|
|
return " LSP"
|
|
|
|
|
else
|
|
|
|
|
return ""
|
|
|
|
|
end
|
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 70
|
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = { fg = default.colors.grey_fg2, bg = default.colors.statusline_bg },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.mode_colors = {
|
|
|
|
|
["n"] = { "NORMAL", default.colors.red },
|
|
|
|
|
["no"] = { "N-PENDING", default.colors.red },
|
|
|
|
|
["i"] = { "INSERT", default.colors.dark_purple },
|
|
|
|
|
["ic"] = { "INSERT", default.colors.dark_purple },
|
|
|
|
|
["t"] = { "TERMINAL", default.colors.green },
|
|
|
|
|
["v"] = { "VISUAL", default.colors.cyan },
|
|
|
|
|
["V"] = { "V-LINE", default.colors.cyan },
|
|
|
|
|
[""] = { "V-BLOCK", default.colors.cyan },
|
|
|
|
|
["R"] = { "REPLACE", default.colors.orange },
|
|
|
|
|
["Rv"] = { "V-REPLACE", default.colors.orange },
|
|
|
|
|
["s"] = { "SELECT", default.colors.nord_blue },
|
|
|
|
|
["S"] = { "S-LINE", default.colors.nord_blue },
|
|
|
|
|
[""] = { "S-BLOCK", default.colors.nord_blue },
|
|
|
|
|
["c"] = { "COMMAND", default.colors.pink },
|
|
|
|
|
["cv"] = { "COMMAND", default.colors.pink },
|
|
|
|
|
["ce"] = { "COMMAND", default.colors.pink },
|
|
|
|
|
["r"] = { "PROMPT", default.colors.teal },
|
|
|
|
|
["rm"] = { "MORE", default.colors.teal },
|
|
|
|
|
["r?"] = { "CONFIRM", default.colors.teal },
|
|
|
|
|
["!"] = { "SHELL", default.colors.green },
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.chad_mode_hl = function()
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.mode_colors[vim.fn.mode()][2],
|
|
|
|
|
bg = default.colors.one_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
2022-01-10 23:39:37 -05:00
|
|
|
|
end
|
2021-07-15 11:43:17 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.empty_space = {
|
|
|
|
|
provider = " " .. default.statusline_style.left,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.one_bg2,
|
|
|
|
|
bg = default.colors.statusline_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-07-15 11:43:17 -04:00
|
|
|
|
|
2022-01-11 01:12:02 -05:00
|
|
|
|
-- this matches the vi mode color
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.empty_spaceColored = {
|
|
|
|
|
provider = default.statusline_style.left,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.mode_colors[vim.fn.mode()][2],
|
|
|
|
|
bg = default.colors.one_bg2,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.mode_icon = {
|
|
|
|
|
provider = default.statusline_style.vi_mode_icon,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.statusline_bg,
|
|
|
|
|
bg = default.mode_colors[vim.fn.mode()][2],
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.empty_space2 = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
2022-01-21 06:49:49 -05:00
|
|
|
|
return " " .. default.mode_colors[vim.fn.mode()][1] .. " "
|
2022-01-11 01:12:02 -05:00
|
|
|
|
end,
|
2022-01-21 06:49:49 -05:00
|
|
|
|
hl = default.chad_mode_hl,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
}
|
2021-08-14 13:05:10 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.separator_right = {
|
|
|
|
|
provider = default.statusline_style.left,
|
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90
|
|
|
|
|
end,
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.grey,
|
|
|
|
|
bg = default.colors.one_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-08-13 02:42:43 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.separator_right2 = {
|
|
|
|
|
provider = default.statusline_style.left,
|
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90
|
|
|
|
|
end,
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.green,
|
|
|
|
|
bg = default.colors.grey,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-08-19 08:05:24 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.position_icon = {
|
|
|
|
|
provider = default.statusline_style.position_icon,
|
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90
|
|
|
|
|
end,
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.black,
|
|
|
|
|
bg = default.colors.green,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-08-13 02:42:43 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
default.current_line = {
|
2022-01-11 01:12:02 -05:00
|
|
|
|
provider = function()
|
|
|
|
|
local current_line = vim.fn.line "."
|
|
|
|
|
local total_line = vim.fn.line "$"
|
|
|
|
|
|
|
|
|
|
if current_line == 1 then
|
|
|
|
|
return " Top "
|
|
|
|
|
elseif current_line == vim.fn.line "$" then
|
|
|
|
|
return " Bot "
|
|
|
|
|
end
|
|
|
|
|
local result, _ = math.modf((current_line / total_line) * 100)
|
|
|
|
|
return " " .. result .. "%% "
|
|
|
|
|
end,
|
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
enabled = default.shortline or function(winid)
|
2022-01-11 01:12:02 -05:00
|
|
|
|
return vim.api.nvim_win_get_width(tonumber(winid) or 0) > 90
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
|
|
hl = {
|
2022-01-21 06:49:49 -05:00
|
|
|
|
fg = default.colors.green,
|
|
|
|
|
bg = default.colors.one_bg,
|
2022-01-11 01:12:02 -05:00
|
|
|
|
},
|
|
|
|
|
}
|
2021-07-15 11:43:17 -04:00
|
|
|
|
|
2022-01-11 01:12:02 -05:00
|
|
|
|
local function add_table(a, b)
|
|
|
|
|
table.insert(a, b)
|
|
|
|
|
end
|
2021-07-15 11:43:17 -04:00
|
|
|
|
|
2022-01-21 06:49:49 -05:00
|
|
|
|
local M = {}
|
|
|
|
|
M.setup = function(override_flag)
|
|
|
|
|
if override_flag then
|
|
|
|
|
default = require("core.utils").tbl_override_req("feline", default)
|
|
|
|
|
end
|
|
|
|
|
-- components are divided in 3 sections
|
|
|
|
|
default.left = {}
|
|
|
|
|
default.middle = {}
|
|
|
|
|
default.right = {}
|
|
|
|
|
|
|
|
|
|
-- left
|
|
|
|
|
add_table(default.left, default.main_icon)
|
|
|
|
|
add_table(default.left, default.file_name)
|
|
|
|
|
add_table(default.left, default.dir_name)
|
|
|
|
|
add_table(default.left, default.diff.add)
|
|
|
|
|
add_table(default.left, default.diff.change)
|
|
|
|
|
add_table(default.left, default.diff.remove)
|
|
|
|
|
add_table(default.left, default.diagnostic.error)
|
|
|
|
|
add_table(default.left, default.diagnostic.warning)
|
|
|
|
|
add_table(default.left, default.diagnostic.hint)
|
|
|
|
|
add_table(default.left, default.diagnostic.info)
|
|
|
|
|
|
|
|
|
|
add_table(default.middle, default.lsp_progress)
|
|
|
|
|
|
|
|
|
|
-- right
|
|
|
|
|
add_table(default.right, default.lsp_icon)
|
|
|
|
|
add_table(default.right, default.git_branch)
|
|
|
|
|
add_table(default.right, default.empty_space)
|
|
|
|
|
add_table(default.right, default.empty_spaceColored)
|
|
|
|
|
add_table(default.right, default.mode_icon)
|
|
|
|
|
add_table(default.right, default.empty_space2)
|
|
|
|
|
add_table(default.right, default.separator_right)
|
|
|
|
|
add_table(default.right, default.separator_right2)
|
|
|
|
|
add_table(default.right, default.position_icon)
|
|
|
|
|
add_table(default.right, default.current_line)
|
|
|
|
|
|
|
|
|
|
default.components.active[1] = default.left
|
|
|
|
|
default.components.active[2] = default.middle
|
|
|
|
|
default.components.active[3] = default.right
|
|
|
|
|
|
|
|
|
|
feline.setup {
|
|
|
|
|
theme = {
|
|
|
|
|
bg = default.colors.statusline_bg,
|
|
|
|
|
fg = default.colors.fg,
|
|
|
|
|
},
|
|
|
|
|
components = default.components,
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return M
|