feat: enhance statusline with icon and text concatenation

This commit is contained in:
2024-10-11 12:49:00 -04:00
parent 77b20b2831
commit a09d836f0d
5 changed files with 40 additions and 20 deletions
+4
View File
@@ -1245,9 +1245,12 @@ function M.mc_statusline()
status.color = "lualine_a_normal"
end
end
-- Add the icon and text to the status object
status.icon_short_text = status.icon .. status.short_text
status.icon_text = status.icon .. status.text
-- Update the status object
if status.cursors > 1 and status.disabled > 0 then
status.count = status.cursors .. "/" .. status.disabled
elseif status.cursors > 1 and status.disabled <= 0 then
@@ -1482,6 +1485,7 @@ function M.setup_replace_ellipsis(enable)
vim.api.nvim_create_augroup("EllipsisReplace", { clear = true })
if enable then
-- Add an autocmd to handle the InsertLeave event
vim.api.nvim_create_autocmd("InsertLeave", {
group = "EllipsisReplace",
callback = M.replace_ellipsis,