From 082efd84bbcc2344ec82fd339c9a8addbae49fbe Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 6 Aug 2024 09:51:01 +0300 Subject: fix(heirline): Certain elements of tabline not being updated on specific events --- lua/plugins/heirline.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lua/plugins/heirline.lua') diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua index 4e30553..00e0ca7 100644 --- a/lua/plugins/heirline.lua +++ b/lua/plugins/heirline.lua @@ -1,6 +1,7 @@ return { "rebelot/heirline.nvim", lazy = false, + event = "UiEnter", opts = function() local utils = require("heirline.utils") local conditions = require("heirline.conditions") @@ -24,7 +25,7 @@ return { } local StatusLineColor = utils.get_highlight("StatusLine") - function surround(delimiters, component) + function surround(delimiters, component, additional_update) return { init = function(self) local highlight @@ -53,7 +54,7 @@ return { hl = function(self) return self.inverse end, }, - update = { "BufEnter", "BufLeave" }, + update = { "BufEnter", "BufLeave", additional_update }, } end @@ -76,6 +77,7 @@ return { if not vim.bo.modifiable then return prepend.."" end end, }, + update = "BufModifiedSet", } local FileType = { @@ -89,6 +91,7 @@ return { end return icon..vim.bo.filetype end, + update = "FileType", } local Filename = { provider = "%f", } @@ -125,7 +128,7 @@ return { return "ModeNormal" end, - }) + }, "ModeChanged") vim.cmd.highlight({ "RowAndColumn", "ctermfg=238", "ctermbg=244" }) -- cgit v1.3.1-23-gd82d