use better field name

This commit is contained in:
siduck 2022-05-22 14:12:54 +05:30
parent d09abcf8b3
commit ef9230a31b

View file

@ -5,7 +5,6 @@ if not present then
end end
local options = { local options = {
colors = require("base46").get_colors "base_30",
lsp = require "feline.providers.lsp", lsp = require "feline.providers.lsp",
lsp_severity = vim.diagnostic.severity, lsp_severity = vim.diagnostic.severity,
} }
@ -216,7 +215,7 @@ options.lsp_progress = {
-- MODES -- MODES
options.mode_colors = { options.mode_hlgroups = {
["n"] = { "NORMAL", "Feline_NormalMode" }, ["n"] = { "NORMAL", "Feline_NormalMode" },
["no"] = { "N-PENDING", "Feline_NormalMode" }, ["no"] = { "N-PENDING", "Feline_NormalMode" },
["i"] = { "INSERT", "Feline_InsertMode" }, ["i"] = { "INSERT", "Feline_InsertMode" },
@ -255,7 +254,7 @@ options.empty_spaceColored = {
provider = options.separator_style.left, provider = options.separator_style.left,
hl = function() hl = function()
return { return {
fg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), fg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"),
bg = get_color("Feline_EmptySpace", "fg#"), bg = get_color("Feline_EmptySpace", "fg#"),
} }
end, end,
@ -267,17 +266,17 @@ options.mode_icon = {
hl = function() hl = function()
return { return {
fg = get_color("Feline", "bg#"), fg = get_color("Feline", "bg#"),
bg = get_color(options.mode_colors[vim.fn.mode()][2], "fg#"), bg = get_color(options.mode_hlgroups[vim.fn.mode()][2], "fg#"),
} }
end, end,
} }
options.mode_name = { options.mode_name = {
provider = function() provider = function()
return " " .. options.mode_colors[vim.fn.mode()][1] .. " " return " " .. options.mode_hlgroups[vim.fn.mode()][1] .. " "
end, end,
hl = function() hl = function()
return options.mode_colors[vim.fn.mode()][2] return options.mode_hlgroups[vim.fn.mode()][2]
end, end,
} }