2022-01-21 11:49:49 +00:00
|
|
|
|
local present, feline = pcall(require, "feline")
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local fn = vim.fn
|
|
|
|
|
|
|
|
|
|
local function get_color(group, attr)
|
|
|
|
|
return fn.synIDattr(fn.synIDtrans(fn.hlID(group)), attr)
|
|
|
|
|
end
|
2022-04-27 15:42:28 +00:00
|
|
|
|
|
2022-01-21 11:49:49 +00:00
|
|
|
|
if not present then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
2022-05-07 09:24:35 +00:00
|
|
|
|
local options = {
|
|
|
|
|
lsp = require "feline.providers.lsp",
|
|
|
|
|
lsp_severity = vim.diagnostic.severity,
|
|
|
|
|
}
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.icons = {
|
|
|
|
|
mode_icon = " ",
|
|
|
|
|
position_icon = " ",
|
|
|
|
|
empty_file = " Empty ",
|
|
|
|
|
dir = " ",
|
|
|
|
|
clock = " ",
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.icon_styles = {
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
|
|
|
|
-- mix of slant + round
|
2022-01-11 06:12:02 +00:00
|
|
|
|
default = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
round = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = "",
|
|
|
|
|
},
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
block = {
|
|
|
|
|
left = "█",
|
|
|
|
|
right = "█",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
arrow = {
|
|
|
|
|
left = "",
|
|
|
|
|
right = "",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
},
|
2021-08-19 06:29:42 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local statusline_opt = require("core.utils").load_config().plugins.options.statusline.separator_style
|
|
|
|
|
options.separator_style = options.icon_styles[statusline_opt]
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.mode_icon = {
|
|
|
|
|
provider = options.icons.mode_icon,
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline", "bg#"),
|
|
|
|
|
bg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-01-21 11:49:49 +00:00
|
|
|
|
right_sep = {
|
2022-05-07 09:24:35 +00:00
|
|
|
|
str = options.separator_style.right,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color(options.mode_hlgroups[fn.mode()][2], "fg#"),
|
|
|
|
|
bg = get_color("Feline_EmptySpace", "fg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
2022-01-21 11:49:49 +00:00
|
|
|
|
},
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
-- MODES
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.mode_hlgroups = {
|
|
|
|
|
["n"] = { "Normal", "Feline_NormalMode" },
|
|
|
|
|
["no"] = { "N-PENDING", "Feline_NormalMode" },
|
|
|
|
|
["i"] = { "INSERT", "Feline_InsertMode" },
|
|
|
|
|
["ic"] = { "INSERT", "Feline_InsertMode" },
|
|
|
|
|
["t"] = { "TERMINAL", "Feline_TerminalMode" },
|
|
|
|
|
["v"] = { "VISUAL", "Feline_VisualMode" },
|
|
|
|
|
["V"] = { "V-LINE", "Feline_VisualMode" },
|
|
|
|
|
[""] = { "V-BLOCK", "Feline_VisualMode" },
|
|
|
|
|
["R"] = { "REPLACE", "Feline_ReplaceMode" },
|
|
|
|
|
["Rv"] = { "V-REPLACE", "Feline_ReplaceMode" },
|
|
|
|
|
["s"] = { "SELECT", "Feline_SelectMode" },
|
|
|
|
|
["S"] = { "S-LINE", "Feline_SelectMode" },
|
|
|
|
|
[""] = { "S-BLOCK", "Feline_SelectMode" },
|
|
|
|
|
["c"] = { "COMMAND", "Feline_CommandMode" },
|
|
|
|
|
["cv"] = { "COMMAND", "Feline_CommandMode" },
|
|
|
|
|
["ce"] = { "COMMAND", "Feline_CommandMode" },
|
|
|
|
|
["r"] = { "PROMPT", "Feline_ConfirmMode" },
|
|
|
|
|
["rm"] = { "MORE", "Feline_ConfirmMode" },
|
|
|
|
|
["r?"] = { "CONFIRM", "Feline_ConfirmMode" },
|
|
|
|
|
["!"] = { "SHELL", "Feline_TerminalMode" },
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.vi_mode = {
|
2022-01-11 06:12:02 +00:00
|
|
|
|
provider = function()
|
2022-06-02 17:59:15 +00:00
|
|
|
|
return " " .. options.mode_hlgroups[fn.mode()][1] .. " "
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = function()
|
|
|
|
|
return options.mode_hlgroups[fn.mode()][2]
|
|
|
|
|
end,
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
2022-01-11 06:12:02 +00:00
|
|
|
|
right_sep = {
|
2022-05-07 09:24:35 +00:00
|
|
|
|
str = options.separator_style.right,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline_EmptySpace", "bg#"),
|
|
|
|
|
bg = get_color("Feline_nvim_gps", "bg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
2022-01-11 06:12:02 +00:00
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.cwd = {
|
|
|
|
|
-- icon
|
|
|
|
|
left_sep = {
|
|
|
|
|
str = " " .. options.icons.dir,
|
|
|
|
|
hl = "FelineCwd",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
},
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
-- dirname
|
|
|
|
|
provider = function()
|
|
|
|
|
local dir_name = fn.fnamemodify(fn.getcwd(), ":t")
|
|
|
|
|
return " " .. dir_name .. " "
|
|
|
|
|
end,
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = "FelineCwd",
|
2022-05-31 19:19:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-05-20 17:43:18 +00:00
|
|
|
|
-- lsp
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.diagnostic = {
|
2022-01-26 14:47:44 +00:00
|
|
|
|
error = {
|
2022-01-11 06:12:02 +00:00
|
|
|
|
provider = "diagnostic_errors",
|
|
|
|
|
enabled = function()
|
2022-05-07 09:24:35 +00:00
|
|
|
|
return options.lsp.diagnostics_exist(options.lsp_severity.ERROR)
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
|
|
|
|
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_lspError",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
warning = {
|
|
|
|
|
provider = "diagnostic_warnings",
|
|
|
|
|
enabled = function()
|
2022-05-07 09:24:35 +00:00
|
|
|
|
return options.lsp.diagnostics_exist(options.lsp_severity.WARN)
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
|
|
|
|
hl = "Feline_lspWarning",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
hint = {
|
|
|
|
|
provider = "diagnostic_hints",
|
|
|
|
|
enabled = function()
|
2022-05-07 09:24:35 +00:00
|
|
|
|
return options.lsp.diagnostics_exist(options.lsp_severity.HINT)
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_LspHints",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
info = {
|
|
|
|
|
provider = "diagnostic_info",
|
|
|
|
|
enabled = function()
|
2022-05-07 09:24:35 +00:00
|
|
|
|
return options.lsp.diagnostics_exist(options.lsp_severity.INFO)
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_LspInfo",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.lsp_status = {
|
2022-05-20 17:43:18 +00:00
|
|
|
|
provider = function()
|
|
|
|
|
if next(vim.lsp.buf_get_clients()) ~= nil then
|
|
|
|
|
local lsp_name = vim.lsp.get_active_clients()[1].name
|
|
|
|
|
|
|
|
|
|
return " LSP ~ " .. lsp_name .. " "
|
|
|
|
|
else
|
|
|
|
|
return ""
|
|
|
|
|
end
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
|
|
hl = "Feline_LspIcon",
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.lsp_progress = {
|
2022-01-11 06:12:02 +00:00
|
|
|
|
provider = function()
|
|
|
|
|
local Lsp = vim.lsp.util.get_progress_messages()[1]
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
if not Lsp then
|
|
|
|
|
return ""
|
|
|
|
|
end
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local msg = Lsp.message or ""
|
|
|
|
|
local percentage = Lsp.percentage or 0
|
|
|
|
|
local title = Lsp.title or ""
|
|
|
|
|
local spinners = { "", "" }
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local ms = vim.loop.hrtime() / 1000000
|
|
|
|
|
local frame = math.floor(ms / 120) % #spinners
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
return string.format(" %%<%s %s %s (%s%%%%) ", spinners[frame + 1], title, msg, percentage)
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_LspProgress",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
-- Git
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.diff = {
|
|
|
|
|
add = {
|
|
|
|
|
provider = "git_diff_added",
|
|
|
|
|
hl = "Feline_diffIcons",
|
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
change = {
|
|
|
|
|
provider = "git_diff_changed",
|
|
|
|
|
hl = "Feline_diffIcons",
|
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
remove = {
|
|
|
|
|
provider = "git_diff_removed",
|
|
|
|
|
hl = "Feline_diffIcons",
|
|
|
|
|
icon = " ",
|
|
|
|
|
},
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.git_branch = {
|
|
|
|
|
provider = "git_branch",
|
|
|
|
|
hl = "Feline_diffIcons",
|
|
|
|
|
icon = " ",
|
|
|
|
|
|
|
|
|
|
right_sep = {
|
|
|
|
|
str = " ",
|
|
|
|
|
hl = "Feline_diffIcons",
|
|
|
|
|
},
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.file_info = {
|
|
|
|
|
left_sep = {
|
|
|
|
|
str = options.separator_style.left,
|
|
|
|
|
hl = "Feline_file_info_sep",
|
|
|
|
|
},
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
-- file icon
|
|
|
|
|
provider = function()
|
|
|
|
|
local filename = fn.expand "%:t"
|
|
|
|
|
local extension = fn.expand "%:e"
|
|
|
|
|
|
2022-06-02 18:28:08 +00:00
|
|
|
|
if filename == "" then
|
|
|
|
|
return options.icons.empty_file
|
|
|
|
|
end
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local icon = require("nvim-web-devicons").get_icon(filename, extension)
|
|
|
|
|
|
2022-06-02 18:28:08 +00:00
|
|
|
|
if icon == nil then
|
|
|
|
|
icon = " "
|
2022-06-02 17:59:15 +00:00
|
|
|
|
else
|
2022-06-02 18:28:08 +00:00
|
|
|
|
icon = icon .. " "
|
2022-06-02 17:59:15 +00:00
|
|
|
|
end
|
2022-06-02 18:28:08 +00:00
|
|
|
|
|
|
|
|
|
return icon
|
2022-05-21 03:32:45 +00:00
|
|
|
|
end,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
|
|
|
|
hl = "Feline_file_info",
|
|
|
|
|
|
|
|
|
|
-- file name
|
|
|
|
|
right_sep = {
|
|
|
|
|
str = function()
|
|
|
|
|
local filename = fn.expand "%:t"
|
|
|
|
|
return " " .. fn.fnamemodify(filename, ":r") .. " "
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline_file_info", "bg#"),
|
|
|
|
|
bg = get_color("Feline_file_info", "fg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
},
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.nvim_gps = {
|
2022-01-11 06:12:02 +00:00
|
|
|
|
provider = function()
|
2022-06-02 17:59:15 +00:00
|
|
|
|
-- nvim-gps loads at cursorMoved so need to handle this
|
|
|
|
|
local gps_loaded, gps = pcall(require, "nvim-gps")
|
|
|
|
|
|
|
|
|
|
if not gps_loaded then
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return " " .. gps.get_location()
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
|
|
|
|
enabled = function()
|
|
|
|
|
local gps_loaded, gps = pcall(require, "nvim-gps")
|
|
|
|
|
|
|
|
|
|
if not gps_loaded then
|
|
|
|
|
return false
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
return gps.is_available()
|
2022-05-20 17:43:18 +00:00
|
|
|
|
end,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
|
|
|
|
right_sep = {
|
|
|
|
|
str = " ",
|
|
|
|
|
hl = "Feline_nvim_gps",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
hl = "Feline_nvim_gps",
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
options.separator_left = {
|
|
|
|
|
provider = options.separator_style.right,
|
|
|
|
|
hl = "Feline_EmptySpace",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-08-14 17:05:10 +00:00
|
|
|
|
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.separator_right = {
|
|
|
|
|
provider = options.separator_style.left,
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_EmptySpace",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-08-13 06:42:43 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.separator_right_file = {
|
2022-05-07 09:24:35 +00:00
|
|
|
|
provider = options.separator_style.left,
|
2022-06-02 17:59:15 +00:00
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline_EmptySpace", "fg#"),
|
|
|
|
|
bg = get_color("Feline_nvim_gps", "bg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-08-19 12:05:24 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
options.time = {
|
|
|
|
|
left_sep = {
|
|
|
|
|
str = options.separator_style.left,
|
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline_time", "fg#"),
|
|
|
|
|
bg = get_color("Feline_EmptySpace", "fg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
icon = {
|
|
|
|
|
str = options.icons.clock,
|
|
|
|
|
hl = function()
|
|
|
|
|
return {
|
|
|
|
|
fg = get_color("Feline_time", "bg#"),
|
|
|
|
|
bg = get_color("Feline_time", "fg#"),
|
|
|
|
|
}
|
|
|
|
|
end,
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
provider = function()
|
|
|
|
|
return " " .. fn.strftime "%H:%M" .. " "
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
|
|
hl = "Feline_time",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-08-13 06:42:43 +00:00
|
|
|
|
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.current_line = {
|
2022-06-02 17:59:15 +00:00
|
|
|
|
|
|
|
|
|
left_sep = {
|
|
|
|
|
str = options.separator_style.left,
|
|
|
|
|
hl = "Feline_PositionSeparator",
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
icon = {
|
|
|
|
|
str = options.icons.position_icon,
|
|
|
|
|
hl = "Feline_PositionIcon",
|
|
|
|
|
},
|
|
|
|
|
|
2022-01-11 06:12:02 +00:00
|
|
|
|
provider = function()
|
2022-06-02 17:59:15 +00:00
|
|
|
|
local current_line = fn.line "."
|
|
|
|
|
local total_line = fn.line "$"
|
2022-01-11 06:12:02 +00:00
|
|
|
|
|
|
|
|
|
if current_line == 1 then
|
|
|
|
|
return " Top "
|
2022-06-02 17:59:15 +00:00
|
|
|
|
elseif current_line == fn.line "$" then
|
2022-01-11 06:12:02 +00:00
|
|
|
|
return " Bot "
|
|
|
|
|
end
|
|
|
|
|
local result, _ = math.modf((current_line / total_line) * 100)
|
|
|
|
|
return " " .. result .. "%% "
|
|
|
|
|
end,
|
|
|
|
|
|
2022-05-20 17:43:18 +00:00
|
|
|
|
hl = "Feline_CurrentLine",
|
2022-01-11 06:12:02 +00:00
|
|
|
|
}
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-05-29 10:37:47 +00:00
|
|
|
|
options = require("core.utils").load_override(options, "feline-nvim/feline.nvim")
|
2022-05-07 09:24:35 +00:00
|
|
|
|
|
|
|
|
|
local function add_table(tbl, inject)
|
|
|
|
|
if inject then
|
|
|
|
|
table.insert(tbl, inject)
|
|
|
|
|
end
|
2022-01-11 06:12:02 +00:00
|
|
|
|
end
|
2021-07-15 15:43:17 +00:00
|
|
|
|
|
2022-04-27 15:42:28 +00:00
|
|
|
|
-- components are divided in 3 sections
|
2022-05-07 09:24:35 +00:00
|
|
|
|
options.left = {}
|
|
|
|
|
options.middle = {}
|
|
|
|
|
options.right = {}
|
2022-04-27 15:42:28 +00:00
|
|
|
|
|
|
|
|
|
-- left
|
2022-06-02 17:59:15 +00:00
|
|
|
|
add_table(options.left, options.mode_icon)
|
|
|
|
|
add_table(options.left, options.separator_left)
|
|
|
|
|
add_table(options.left, options.vi_mode)
|
|
|
|
|
add_table(options.left, options.cwd)
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
|
|
|
|
-- lsp
|
2022-06-02 17:59:15 +00:00
|
|
|
|
add_table(options.left, options.lsp_status)
|
2022-05-07 09:24:35 +00:00
|
|
|
|
add_table(options.left, options.diagnostic.error)
|
|
|
|
|
add_table(options.left, options.diagnostic.warning)
|
|
|
|
|
add_table(options.left, options.diagnostic.hint)
|
|
|
|
|
add_table(options.left, options.diagnostic.info)
|
|
|
|
|
|
|
|
|
|
add_table(options.middle, options.lsp_progress)
|
2022-06-02 17:59:15 +00:00
|
|
|
|
add_table(options.middle, options.nvim_gps)
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
|
|
|
|
-- git diffs
|
|
|
|
|
add_table(options.right, options.diff.add)
|
|
|
|
|
add_table(options.right, options.diff.change)
|
|
|
|
|
add_table(options.right, options.diff.remove)
|
2022-05-07 09:24:35 +00:00
|
|
|
|
add_table(options.right, options.git_branch)
|
2022-05-20 17:43:18 +00:00
|
|
|
|
|
2022-06-02 17:59:15 +00:00
|
|
|
|
add_table(options.right, options.separator_right_file)
|
|
|
|
|
add_table(options.right, options.file_info)
|
|
|
|
|
|
|
|
|
|
add_table(options.right, options.separator_right)
|
|
|
|
|
add_table(options.right, options.time)
|
2022-05-07 09:24:35 +00:00
|
|
|
|
add_table(options.right, options.separator_right)
|
|
|
|
|
add_table(options.right, options.current_line)
|
|
|
|
|
|
|
|
|
|
-- Initialize the components table
|
|
|
|
|
options.components = { active = {} }
|
|
|
|
|
|
|
|
|
|
options.components.active[1] = options.left
|
|
|
|
|
options.components.active[2] = options.middle
|
|
|
|
|
options.components.active[3] = options.right
|
|
|
|
|
|
|
|
|
|
options.theme = {
|
2022-05-20 17:43:18 +00:00
|
|
|
|
fg = get_color("Feline", "fg#"),
|
|
|
|
|
bg = get_color("Feline", "bg#"),
|
2022-05-07 09:24:35 +00:00
|
|
|
|
}
|
2022-04-27 15:42:28 +00:00
|
|
|
|
|
|
|
|
|
feline.setup {
|
2022-05-07 09:24:35 +00:00
|
|
|
|
theme = options.theme,
|
|
|
|
|
components = options.components,
|
2022-04-27 15:42:28 +00:00
|
|
|
|
}
|