fix: header text in case of no nvim-web-devicons setup and show current provider/model in it (#1617)

This commit is contained in:
brook hong
2025-03-18 19:40:50 +08:00
committed by GitHub
parent 10ce065d9e
commit a8baee4354

View File

@@ -1419,12 +1419,14 @@ function Sidebar:render_header(winid, bufnr, header_text, hl, reverse_hl)
end
if Config.windows.sidebar_header.rounded then
winbar_text = winbar_text .. "%#" .. reverse_hl .. "#" .. "" .. "%#" .. hl .. "#"
winbar_text = winbar_text .. "%#" .. reverse_hl .. "#" .. Utils.icon("", "") .. "%#" .. hl .. "#"
else
winbar_text = winbar_text .. "%#" .. hl .. "#"
end
winbar_text = winbar_text .. header_text
if Config.windows.sidebar_header.rounded then winbar_text = winbar_text .. "%#" .. reverse_hl .. "#" end
if Config.windows.sidebar_header.rounded then
winbar_text = winbar_text .. "%#" .. reverse_hl .. "#" .. Utils.icon("", "")
end
winbar_text = winbar_text .. "%#Normal#"
if Config.windows.sidebar_header.align == "center" then winbar_text = winbar_text .. "%=" end
api.nvim_set_option_value("winbar", winbar_text, { win = winid })