From c32b1c1e455ecde2522e8a32959cb57440e606ed Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 26 Nov 2024 14:00:03 -0500 Subject: [PATCH] AutoYADM commit: 2024-11-26 14:00:03 --- .config/nvim/lua/plugins/lualine.lua | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 557bd2c0..f0c7f2c7 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -7,8 +7,32 @@ local function getWords() return w .. wc["words"] end end +local modes = { + NORMAL = "NRM", + INSERT = "INS", + VISUAL = "VIS", + ["V-LINE"] = "V-L", + ["V-BLOCK"] = "V-B", + SELECT = "SEL", + ["S-LINE"] = "S-L", + ["S-BLOCK"] = "S-B", + COMMAND = "CMD", + TERMINAL = "TRM", + ["O-PENDING"] = "O-P", + EX = "EX", + REPLACE = "REP", + ["V-REPLACE"] = "V-R", +} local sections = { - lualine_a = { "mode" }, + lualine_a = { + { + "mode", + fmt = function(str) + return modes[str] or str + end, + }, + }, + -- lualine_a = { "mode" }, lualine_b = { "branch", "diff" }, lualine_c = { { "filename", path = 1 } }, lualine_x = { "diagnostics", { "filetype", colored = false }, { getWords } }, @@ -29,6 +53,8 @@ return { theme = theme, -- section_separators = { left = "", right = "" }, -- component_separators = { left = "", right = "" }, + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, }, sections = sections, inactive_sections = nb_inactive_sections,